由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - "#! /bin/csh" != "#!/bin/csh" ??????
相关主题
how to change the log in shell?question
急!!!!sun os中如何更改登陆shell?
为什么普通用户无法登陆?where is the passwd file stored
lost root accountcan anyone post a FTP auto get script ?
login shell and normal shell?Help! shell programming
No shell ?Shell Script Question
bad root shell?如何在perl中运行c-shell file?
Korn shell script菜鸟2问题-about shell programming
相关话题的讨论汇总
话题: csh话题: bin话题: file话题: when话题: awk
进入Unix版参与讨论
1 (共1页)
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.

1 (共1页)
进入Unix版参与讨论
相关主题
菜鸟2问题-about shell programminglogin shell and normal shell?
新手求助shell scriptNo shell ?
What's defference between Saloris&SunOs?bad root shell?
Solaris VersionsKorn shell script
how to change the log in shell?question
急!!!!sun os中如何更改登陆shell?
为什么普通用户无法登陆?where is the passwd file stored
lost root accountcan anyone post a FTP auto get script ?
相关话题的讨论汇总
话题: csh话题: bin话题: file话题: when话题: awk