Not to bash on Bash.

My job out of college was working on the UCSC Genome Browser QA team. One of the first things I had to do was get comfortable with the Born again shell (bash). I found it really helpful to have a quiver of one-liners for repetitive tasks. For example, I can create a dummy data file with 1000 lines: for((i=1;i<=1000; i++)); do echo "data_point_$i" >> data_munging.txt; done Let’s say I needed to add each entry in an SQL query (for some reason) I’d need to remove the new lines and add a comma as a separator with each data_point in single quotes....

2 min · 389 words · Chris