u*******n 发帖数: 119 | 1 When I use a software to process my data, I find there is
one shell script file doesn't work for my machine ( SunOS 5.7).
I check this file, and find the top of this file is
"#! /bin/csh"
When I delete the "blank" between "!" and "/bin/csh", i.e., change this
line as
"#!/bin/csh"
It works !!!
Since, in this file, there are lots of awk commond. I guess "#! /bin/csh"
will lead to "/bin/sh" to run this file, and hence lead to my awk problem.
So, is my idea correct ? I am not sure. After all, I am a | c**t 发帖数: 2744 | 2
You may run '/bin/csh yourscriptfile', then a new child csh will be created.
I think 'awk' also works in sh or ksh. You can run 'echo $RAMDOM' to figure
out what the default shell is. ( Return something, ksh; empty BourneShell;
error prompt, csh) or 'grep blah /etc/passwd' to do the same job.
【在 u*******n 的大作中提到】 : When I use a software to process my data, I find there is : one shell script file doesn't work for my machine ( SunOS 5.7). : I check this file, and find the top of this file is : "#! /bin/csh" : When I delete the "blank" between "!" and "/bin/csh", i.e., change this : line as : "#!/bin/csh" : It works !!! : Since, in this file, there are lots of awk commond. I guess "#! /bin/csh" : will lead to "/bin/sh" to run this file, and hence lead to my awk problem.
| u*******n 发帖数: 119 | 3
Thanks at first.
However, it seems that RAMDOM is an Undefined variable.
As to "/etc/passwd", that file is shadowed.
As I remember, there is a commond can show the password file. Who knows ?
【在 c**t 的大作中提到】 : : You may run '/bin/csh yourscriptfile', then a new child csh will be created. : I think 'awk' also works in sh or ksh. You can run 'echo $RAMDOM' to figure : out what the default shell is. ( Return something, ksh; empty BourneShell; : error prompt, csh) or 'grep blah /etc/passwd' to do the same job.
| c**t 发帖数: 2744 | 4
It seems that the default shell is (t)csh. 'echo $SHELL' to verify.
【在 u*******n 的大作中提到】 : : Thanks at first. : However, it seems that RAMDOM is an Undefined variable. : As to "/etc/passwd", that file is shadowed. : As I remember, there is a commond can show the password file. Who knows ?
| u*******n 发帖数: 119 | 5
It shows " /bin/csh". I guess the problem in that codes is caused by a
unseen symbol.
Thanks, buddy
-
-
【在 c**t 的大作中提到】 : : It seems that the default shell is (t)csh. 'echo $SHELL' to verify.
|
|