avatar
j*y
1
what's the meaning the following expression?
vi load_image.sh
pls be as detailed as possible, thanks,
avatar
T*r
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,

avatar
j*y
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

avatar
T*r
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?

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