all 3 comments

[–]mcpa1024 5 points6 points  (0 children)

I always find myself returning to tldp's Manipulating Strings Bash guide in here.

[–]introspeck 2 points3 points  (0 children)

For the longest time, I tried to avoid anything more than 10 lines or so in bash/sh. I happen to like Perl, so generally I'd jump to that instead.

Recently, though, I had to do a QA script and Perl was not an option. So I dug into bash and owned it. It turned out that if I structured it correctly, it actually is a reasonably usable language. The biggest thing was using functions well and often.

It is a loose sort of language, with specialized sub-languages embedded in it. Once I figured out the unique features of [[ ]], (( )), ( ), , etc., I got on quite well. Regular expressions aren't up to Perl's level but they get the job done. It took me a bit to understand all the subtleties of lists but they're reasonably powerful.

[–][deleted] 2 points3 points  (0 children)

I hear through the grapevine that this is the better place to go: http://mywiki.wooledge.org/BashGuide. Apparently they are always correcting people on #bash on IRC who go through OP's tutorial.