Tuesday, January 01, 2019

What I Like Most About bash - Really

Hoorah! I just found out bash was created by a black man. What a pleasant surprise.

Aha - Jason Cannon's average-rated work is available for free today :) Get it while you can for $0.

Yikes, at Tip #5, you see why it only gets three stars - for command subs this guy says use backticks - when that's what got the dinosaurs. Use $( command ) dude!

A good one, that I didn't know : !# is an alias for the current command line and words are ordered starting with 0. So, in the below command.

$ mv report.txt $(data +%F)-report.txt   # basically timestamping

you can do

$ mv report.txt $(data +%F)-!#:1          # cute?

QED


No comments: