shell 脚本参数问题

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
linuxier
帖子: 317
注册时间: 2008-05-27 10:45
联系:

shell 脚本参数问题

#1

帖子 linuxier » 2010-03-09 13:10

不是 emacs 要在 中文 环境才能用 scim 么,但我喜欢用英文环境,因为很多软件没有汉化,中英混合太难看。

命令很简单
echo 'LANG =zh_CN.UTF-8 emacs' > /usr/local/bin/xemacs

然后我想在打开文件时使用的是 xemacs,但双击关联了的文件它只能打开一个空文件。
上次由 linuxier 在 2010-03-09 15:02,总共编辑 1 次。
blog: http://sxpspace.blogspot.com , http://hi.baidu.com/sxpspace
amd 5000+ /nvidia 8500gt
debian testing amd64/xfce4
#nvidia 官方驱动真是越来越垃圾了,无语。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: shell 脚本参数问题

#2

帖子 eexpress » 2010-03-09 14:08

'LANG =zh_CN.UTF-8 emacs $*'
试试
● 鸣学
头像
linuxier
帖子: 317
注册时间: 2008-05-27 10:45
联系:

Re: shell 脚本参数问题

#3

帖子 linuxier » 2010-03-09 15:38

eexpress 写了:'LANG =zh_CN.UTF-8 emacs $*'
试试
开始加了 $1 不好用,现在好了。谢谢!
blog: http://sxpspace.blogspot.com , http://hi.baidu.com/sxpspace
amd 5000+ /nvidia 8500gt
debian testing amd64/xfce4
#nvidia 官方驱动真是越来越垃圾了,无语。
aerofox
帖子: 1453
注册时间: 2008-05-24 8:30

Re: shell 脚本参数问题

#4

帖子 aerofox » 2010-03-23 0:42

应该用 "$@":
echo 'LANG =zh_CN.UTF-8 emacs "$@"' > /usr/local/bin/xemacs
否则还可能遇到问题的。
回复