由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 怎么实现这个alias (转载)
相关主题
[转载] Re: emacs 还是比较麻烦perl to html
a emacs and shell script question用python生成傻shell脚本如何?
how to program a shell extension用emacs运行python script
借人气问Mac上的emacs怎么设置spell checkhelp for perl script -- my $p=($b>$a)?$b:$a;
iMAC terminal bash doesn't take .bashrc ?[转载] A shell script question. :)
请教: KDE 里面的terminal 没法用了 (转载)关于shell script的一个问题
what's wrong with this scripts?variable passing?Shell script 问题
关于perl和linux shell script的书最经典有哪些? (转载)shell script question
相关话题的讨论汇总
话题: alias话题: emac话题: 实现话题: shell话题: script
进入Programming版参与讨论
1 (共1页)
a*****8
发帖数: 261
1
【 以下文字转载自 Linux 讨论区 】
发信人: apollo8 (apollo8), 信区: Linux
标 题: 怎么实现这个alias
发信站: BBS 未名空间站 (Tue Dec 3 21:10:56 2013, 美东)
hi
我现在需要写个alias under tcsh:
alias emac emacsclient
然后每次从terminal我输入:
linux>emac file1.txt &
就是用emac 打开文件file.txt 并且在背后运行(所有有个 &)
请问,有没有alias 的写法,能够把这个& sign 也加进去?谢谢
b***e
发帖数: 1419
2
I wrote a shell script and alias that in .rc file.

【在 a*****8 的大作中提到】
: 【 以下文字转载自 Linux 讨论区 】
: 发信人: apollo8 (apollo8), 信区: Linux
: 标 题: 怎么实现这个alias
: 发信站: BBS 未名空间站 (Tue Dec 3 21:10:56 2013, 美东)
: hi
: 我现在需要写个alias under tcsh:
: alias emac emacsclient
: 然后每次从terminal我输入:
: linux>emac file1.txt &
: 就是用emac 打开文件file.txt 并且在背后运行(所有有个 &)

a*****8
发帖数: 261
3
.rc? 请问是什么?
谢谢。
另外,能给个例子吗?
再谢谢。
b***e
发帖数: 1419
4
Something like:
#!/bin/bash
emacs $1 &
Save that in a file and make an alias or path in your .bashrc (or .tcshrc).
BTW, 阿sir, 我不写shell script已经很久了。You really need to google it out
of the correct shell script syntax.

【在 a*****8 的大作中提到】
: .rc? 请问是什么?
: 谢谢。
: 另外,能给个例子吗?
: 再谢谢。

a*****8
发帖数: 261
5
多谢大牛的指导。。。
已经搞定。。。 :)
1 (共1页)
进入Programming版参与讨论
相关主题
shell script questioniMAC terminal bash doesn't take .bashrc ?
Help with a simple c-shell script.请教: KDE 里面的terminal 没法用了 (转载)
[合集] how to call a korn shell script in JAVA program?what's wrong with this scripts?variable passing?
[合集] Shell script problem?关于perl和linux shell script的书最经典有哪些? (转载)
[转载] Re: emacs 还是比较麻烦perl to html
a emacs and shell script question用python生成傻shell脚本如何?
how to program a shell extension用emacs运行python script
借人气问Mac上的emacs怎么设置spell checkhelp for perl script -- my $p=($b>$a)?$b:$a;
相关话题的讨论汇总
话题: alias话题: emac话题: 实现话题: shell话题: script