Quote:
Originally Posted by ghostdog74
just curious, can you tell me when is the time that sed is better than awk, considering what they both can and cannot do?
|
One obvious answer is that
sed is simpler, i.e. easier to learn.
So for people who don't do a ton of cli or text manipulation, it might make better sense to learn
sed in a weekend rather than devote more time to
awk.
I should say that I don't have very strong feelings for either one. I tend to use
sed for simple things,
awk for slightly more complex things, and then Perl or Ruby for proper things. But I think your all-or-nothing approach here is a bit ham-fisted. Nearly every *nix system will have both. There's no need to choose between them.