Redian新闻
>
够执着的 --- Re: 我的alia放在script里为什么不工作?
avatar
t*l
2
那你怎么不早点出来!
哦,刚看到,你是"瘸子:!
谢谢啦.告诉我怎么办?
我是个执著的人,说对了.:)
avatar
D*e
3
你得拿定主意到底用什么壳。别一会C壳一会SH壳的。
the first line of your script specifies the shell which will be used by this
script.
#!/bin/sh
#!/bin/csh
#!/bin/tcsh
change the first line of your script to csh or tcsh. alias will work but other
things may
start crashing.

【在 t*******l 的大作中提到】
: 那你怎么不早点出来!
: 哦,刚看到,你是"瘸子:!
: 谢谢啦.告诉我怎么办?
: 我是个执著的人,说对了.:)

avatar
t*l
4
改成了西壳,还是不行。
快帮我想办法:))

【在 D**e 的大作中提到】
: 你得拿定主意到底用什么壳。别一会C壳一会SH壳的。
: the first line of your script specifies the shell which will be used by this
: script.
: #!/bin/sh
: #!/bin/csh
: #!/bin/tcsh
: change the first line of your script to csh or tcsh. alias will work but other
: things may
: start crashing.

avatar
D*e
5
it must work.
try this(that is single qoute, not back-qoute):
#!/bin/tcsh
alias t 'ls -1'
t;

this
other

【在 t*******l 的大作中提到】
: 改成了西壳,还是不行。
: 快帮我想办法:))

avatar
t*l
6
it works when not in the script.

【在 D**e 的大作中提到】
: it must work.
: try this(that is single qoute, not back-qoute):
: #!/bin/tcsh
: alias t 'ls -1'
: t;
:
: this
: other

avatar
D*e
7
kidding me? check for typo.

【在 t*******l 的大作中提到】
: it works when not in the script.
avatar
t*l
8
no kidding.
any alias works well when no in my script.
I logout and log back in, still doesn't work.
sorry for this tough problem :)))

【在 D**e 的大作中提到】
: kidding me? check for typo.
avatar
f*y
9
it does work in for sh

【在 D**e 的大作中提到】
: use csh or tcsh. alias won't work in sh.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。