alias crc32='cksum -o3 "$@"|ruby -e \'STDIN.each{|a|a=a.split;printf "%08X\t%s\n",a[0],a[2..-1].join(" ")}\'; }'
In Mountain Lion, it gives me:
-bash: syntax error near unexpected token `('
In Lion (and previous I'm assuming), it works with no error.
I've tried various escapes within the join parentheses, but none seem to work.
TIA
Since feature requests to mark a comment as an answer remain declined, I copy the above solution here.
The bash manual says: "Enclosing characters in single quotes (') preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash." – Keith Thompson