由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - 够执着的 --- Re: 我的alia放在script里为什么不工作?
相关主题
我的alia放在script里为什么不工作?how to grep with more than one patterns in tcsh?
[转载] 如何返回当前窗口正在运行的程序名称A qucik Q about bash alias
HELP!! (CXTERM)A question about command time
tc shell script??what is wrong with my alias?
[转载] apache conf help!!!急,定时运行程序的问题
how to run background process after logouthow to remove a whole directory?
How to find a file in the deep children directory?简单问题一个
how to use chinese font under solaris? help!问一个列目录的问题
相关话题的讨论汇总
话题: script话题: tcsh话题: alias话题: alia话题: sh
进入Unix版参与讨论
1 (共1页)
D**e
发帖数: 10169
1
use csh or tcsh. alias won't work in sh.
t*******l
发帖数: 421
2
那你怎么不早点出来!
哦,刚看到,你是"瘸子:!
谢谢啦.告诉我怎么办?
我是个执著的人,说对了.:)
D**e
发帖数: 10169
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 的大作中提到】
: 那你怎么不早点出来!
: 哦,刚看到,你是"瘸子:!
: 谢谢啦.告诉我怎么办?
: 我是个执著的人,说对了.:)

t*******l
发帖数: 421
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.

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

this
other

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

t*******l
发帖数: 421
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

D**e
发帖数: 10169
7
kidding me? check for typo.

【在 t*******l 的大作中提到】
: it works when not in the script.
t*******l
发帖数: 421
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.
f***y
发帖数: 98
9
it does work in for sh

【在 D**e 的大作中提到】
: use csh or tcsh. alias won't work in sh.
1 (共1页)
进入Unix版参与讨论
相关主题
问一个列目录的问题[转载] apache conf help!!!
how to let a command set in .cshrc run?how to run background process after logout
如何在console 上启动emacs?How to find a file in the deep children directory?
which shell is best? how to use chinese font under solaris? help!
我的alia放在script里为什么不工作?how to grep with more than one patterns in tcsh?
[转载] 如何返回当前窗口正在运行的程序名称A qucik Q about bash alias
HELP!! (CXTERM)A question about command time
tc shell script??what is wrong with my alias?
相关话题的讨论汇总
话题: script话题: tcsh话题: alias话题: alia话题: sh