"... is silly, there are better ways."
I see this usage often where it seems like
grep pattern1 | grep -v pattern2
can be replaced by
sed -n '/pattern1/d;/pattern2/p'
or at least
sed '/pattern1/!d' | sed '/pattern2/d'
or
sed -n 's/pattern1pattern2//g;/pattern2/p'
But I must be missing something obvious.
For example look at the "grep -v" usage here:
https://github.com/thomwiggers/qhasm/raw/master/qhasm-arm
Is there something wrong with using
sed '/^op:livefloat80:/d'
Moreover, in the last line, why not use
sed 's/\$/#/g'
instead of
tr '$' '#'
Apologies if I am missing the obvious.
I see this usage often where it seems like
can be replaced by or at least or But I must be missing something obvious.For example look at the "grep -v" usage here:
https://github.com/thomwiggers/qhasm/raw/master/qhasm-arm
Is there something wrong with using
Moreover, in the last line, why not use instead of Apologies if I am missing the obvious.