3 ms·
sed, awk or even the fact that I could've used perl from command line sed -i 's/old/new/g' alone would have saved me lot of time instead of fiddling with
by asicsp 6y ago
sed, awk or even the fact that I could've used perl from command line
sed -i 's/old/new/g'
alone would have saved me lot of time instead of fiddling with a perl script everytime
Also, I would've liked to understand shell concepts like file redirections, command substitution, parameter expansion, difference between stdout/stderr, why sometimes I got an error for too many file arguments, or even knew that there existed sites like https://mywiki.wooledge.org/BashFAQ https://mywiki.wooledge.org/BashFAQ and stackoverflow/unix.stackexchange and https://www.shellcheck.net/ https://www.shellcheck.net/ and https://explainshell.com/ https://explainshell.com/ and so on.
- m3adow 6y agoJust as an addition to the OP comment: "perl -pe 's/old/new/g'" is the perl pendant for sed. The obvious advantage is the support for Perl regexes. Also there's the "-r" switch for sed which extends Regexes compatibility.
- deleted 6y ago[deleted]