Y
Hacker News
new
|
ask
|
show
|
jobs
by
jf
2120 days ago
Does anybody know why there are line breaks in the sed command?
1 comments
forgotpwd16
2120 days ago
It runs multiple expressions. That is
sed '/pattern1/d pattern2/d'
is the same with
sed '/pattern1/d; /pattern2/d'
and
sed -e '/pattern1/d' -e '/pattern2/d'
I believe those are portable across all `sed` implementations, and they at least work with GNU `sed --posix` and plan9port's sed.
link
jf
2120 days ago
Thank you! This is exactly the kind of reply I was hoping for.
link