[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sed blindly eats everything beyond w command filename
From: |
Dan Jacobson |
Subject: |
sed blindly eats everything beyond w command filename |
Date: |
27 Feb 2001 11:00:33 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
sed blindly eats everything beyond w command filename.
All the parsing rules go down the drain until newline do we part.
0/tmp$ echo wwwww|sed 'w w;w p'
wwwww
1/tmp$ ll w*
-rw-r--r-- 1 jidanni jidanni 6 02 27 10:36 w;w p
OK, try the {} thingy:
0/tmp$ echo wwwww|sed '{w w};{w p}'
sed: -e expression #1, char 0: Unmatched `{'
1/tmp$ echo wwwww|sed '1{w w};1{w p}'
sed: -e expression #1, char 0: Unmatched `{'
1/tmp$ echo wwwww|sed '1{ w w };1{w p}'
sed: -e expression #1, char 0: Unmatched `{'
same difference, munch munch munch
no token will stop it, only a newline:
0/tmp$ echo wwwww|sed 'w a
> w b'
wwwww
0/tmp$ ls -t1
a
b
w };1{w p}
w};1{w p}
w};{w p}
w;w p
If this is not _bad_ then please at least document it with the w command.
GNU sed version 3.02
--
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- sed blindly eats everything beyond w command filename,
Dan Jacobson <=