[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sed: must do append before delete?
From: |
Dan Jacobson |
Subject: |
sed: must do append before delete? |
Date: |
07 Oct 2001 11:34:55 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Interesting, very interesting, where is the logic to defend:
$ yes|sed 2q|sed '$d;$a\
> hello'
y
$ yes|sed 2q|sed '$a\
> hello
> $d'
y
hello
$ sed --version
GNU sed version 3.02
seems backwards to me. I delete the line and then write something
there, instead that something gets deleted. Instead I write something
there and then delete that line and instead it stays. Using the i
command instead of the a command one gets the same results. Using
s/.*// instead of d allows the hello thru though...
--
http://www.geocities.com/jidanni Tel+886-4-25854780
- sed: must do append before delete?,
Dan Jacobson <=