I both love and hate writing Bash. I love that it's so streamlined for operating on files and working with processes (I agree with this popular question that it's way better in this regard than Python, Ruby, etc.), but I hate the syntax, particularly around conditionals, loops, etc.
(This is subjective, but I find it both confusing and annoying. E.g.
$AGGREGATE_FILENAME = 'allfiles.txt'
if not exists $AGGREGATE_FILENAME
for $file in files/*
cat $file >> $AGGREGATE_FILENAME
echo 'Tests finished!'
mv foo bar/
Since I originally asked this question, two projects have been released which attack this problem and do a pretty good job. Both reimplement many/most Unix tools in more programming-friendly runtimes.
Plumbum is implemented in Python and looks pretty solid:
ShellJS is implemented on Node.js and also looks pretty good:
Exciting developments! I'm looking forward to trying them out. If you already have, it'd be great to hear your experiences in the comments. Thanks!