DEV Community

Discussion on: Fun with Bash

Collapse
 
moopet profile image
Ben Sinclair

I've never used column before. That's pretty cool.
As far as the WTFness of it all goes, if you split it up and assign variables with nice names it'll be easy enough to understand. There's something about shell scripts though that make people write things as tersely as possible. I'd end up with something like that and refer back to it in my history if I needed it again soon after, but if I made it into a script I'd either comment the hell out of it or split it into parts, I think.

Bugfix:

tail -n X prints the last X lines, the plus inverts it so its the first X lines.

if it did that, it'd be head :) The plus means take the offset from the start of the file instead of the end.