由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - unix shell help?
相关主题
How to view chinese character in Linux or UnixRe: 为什么emacs自动给我加^M.
pine中的中文输入问题UNIX SHELL 下中文
how to transfer C program run under VC to Unix?Shell Script
如何显示出“*”how to copy image in UNIX?
any solution to view Chinese in unix console?帮帮忙,用C作一个SHELL
Chinese Characterbad root shell?
how to get rid of the ^M in files?为什么我就是不会写Shell script?
请问几个关于Sed的问题a silly question?
相关话题的讨论汇总
话题: image话题: pattern话题: load话题: unix话题: shell
进入Unix版参与讨论
1 (共1页)
j***y
发帖数: 2074
1
what's the meaning the following expression?
vi load_image.sh
pls be as detailed as possible, thanks,
T********r
发帖数: 6210
2

1,$: from the first line of the file to the last line
s: find some matching pattern, and replace with another pattern
/: begin the matching pattern
.: match any character
*: match any number of characters, i.e., 0 - any characters
/: end of the matching pattern, begin the replacing pattern
.\/load_image.pl Image\/: replacing pattern is ./load_image.pl Image/
note the difference between a single '/' and '\/'. for '/', it is
the delimit character between patterns. for '\/', it represents th

【在 j***y 的大作中提到】
: what's the meaning the following expression?
: vi load_image.sh
: pls be as detailed as possible, thanks,

j***y
发帖数: 2074
3

I find this is the most difficult part. All others I can understand.
So with "&" present, the effect is to insert the string "./load_image.pl
Image/" in the beginning of every line in the file, coz "&" tells it not to
match anything, right?

【在 T********r 的大作中提到】
:
: 1,$: from the first line of the file to the last line
: s: find some matching pattern, and replace with another pattern
: /: begin the matching pattern
: .: match any character
: *: match any number of characters, i.e., 0 - any characters
: /: end of the matching pattern, begin the replacing pattern
: .\/load_image.pl Image\/: replacing pattern is ./load_image.pl Image/
: note the difference between a single '/' and '\/'. for '/', it is
: the delimit character between patterns. for '\/', it represents th

T********r
发帖数: 6210
4

frankly speaking, I do not know the meaning of & either. just made a guess
here, hehe. ok, my guess might be wrong. & probably means the matched
pattern. check the following link:
http://www.unicode.org/reports/tr18/

【在 j***y 的大作中提到】
:
: I find this is the most difficult part. All others I can understand.
: So with "&" present, the effect is to insert the string "./load_image.pl
: Image/" in the beginning of every line in the file, coz "&" tells it not to
: match anything, right?

j***y
发帖数: 2074
5

Yes, you are right on this point.
http://www.cis.tugraz.at/zid/peter/unix/regular.html

【在 T********r 的大作中提到】
:
: frankly speaking, I do not know the meaning of & either. just made a guess
: here, hehe. ok, my guess might be wrong. & probably means the matched
: pattern. check the following link:
: http://www.unicode.org/reports/tr18/

1 (共1页)
进入Unix版参与讨论
相关主题
a silly question?any solution to view Chinese in unix console?
which shell is the best among csh, ksh, bsh?Chinese Character
各位大哥,哪儿有免费的how to get rid of the ^M in files?
在unix 下,光曲不能弹出。只能从起,再拿盘。请教。请问几个关于Sed的问题
How to view chinese character in Linux or UnixRe: 为什么emacs自动给我加^M.
pine中的中文输入问题UNIX SHELL 下中文
how to transfer C program run under VC to Unix?Shell Script
如何显示出“*”how to copy image in UNIX?
相关话题的讨论汇总
话题: image话题: pattern话题: load话题: unix话题: shell