5 ms·
Perl aside, I would say that's almost imperative to learn sed and awk. They invaluable tools for getting things done in *nix. They seem cryptic at first, but pu
by ilovetux 8y ago
Perl aside, I would say that's almost imperative to learn sed and awk. They invaluable tools for getting things done in *nix. They seem cryptic at first, but put a weekend into learning them and you learn that they are simply concise.
- acqq 8y agoAnd as an extremely good free resource for awk I recommend: https://www.gnu.org/software/gawk/manual/gawk.html#Getting-Started https://www.gnu.org/software/gawk/manual/gawk.html#Getting-S...
- lapnitnelav 8y agoI use Grymoire as my goto sed / awk reference. http://www.grymoire.com/Unix/Awk.html http://www.grymoire.com/Unix/Awk.html http://www.grymoire.com/Unix/Sed.html http://www.grymoire.com/Unix/Sed.html
- acqq 8y agoThanks! It has really good coverage of all the shell-related problems.
- wink 8y agoAnd then you have a script that needs to run on a mac as well and you can either fight that the people will install the gnu version or you just rewrite your one-liner in perl. I'm not a huge fan of perl but I've been writing my one-liners in it for a few years now and I've had less problems with portability.
- ilovetux 8y agoI would use another language for distributing a script (probably) python. Awk and sed I use more on a one-off basis although I do have a list of ones I use frequently.
- masukomi 8y agoWould that be the deprecated 2.x with OS X or 3.x which has been available for years? To put it another way, you've replaced sed incompatibility with python incompatibility. It's not really a win. I'm not saying Perl is the best choice here, but it's a better choice than Python for cross platform compatibility.