find, grep, sed, and awk

Joe Klemmer@lemmy.myserv.one to Linux@lemmy.ml – 51 points –
wilsonericn.wordpress.com

Code and comments

25

You are viewing a single comment

I've gotten tired of weird regex stuff in awk, sed, and grep, so I've moved to perl -E for all but the most basic of things.

In most cases extended POSIX regexes are enough and looks the same as perl regexes.

I also used perl until I needed to write highly portable scripts that can be run on systems without perl interpreter (e.g. some minimal linux containers). Simple things are also simple to do with grep/sed/awk, more complex things can be done with awk but require a longer code in comparison with perl.

I've dealt with systems that lack sed and awk. Bash builtins and other standard tools like cut and tr take care of ... well, everything.

Systems with bash but without standard POSIX utils? I know some without bash (freebsd by default, busybox based distros etc.) and with grep, sed and awk, but not vice versa.

1 more...