Wednesday, December 22, 2010

useful bash / vi commands

it's always fun to realize your ghetto workarounds were obsolete decades ago.

Instead of Tomboy > Ctrl-D "insert timestamp"
Try bash ~$ date

Instead of converting
fooemail
email2
email3
to
fooemail, email2, email3 

by hand (end, delete, ctrl-arrow, space, delete, ...), try

~$ vi emails.txt
[shift-j][.][.]

Also, "watch" for monitoring terminal (to your monitor) outputs instead of "tail -f" for monitoring file outputs

And [!] for accessing [history] commands by their number, and the [up-arrow] for previous commands

Also, ever tried to copy-paste a pdf table? (e.g. the innumerable schedules that professors think Must Be In PDF and put up on Stellar =/ has anyone heard of HTML? For the most part it's just as standardized and accessible and I don't end up with 600 files, 200 duplicates scattered my filesystem). It fails miserably, but again vi comes to the rescue, easily.
http://stackoverflow.com/questions/2923570/vim-step-by-step-how-do-you-line-up-arbitrary-text-by-arbitrary-delimiter/2923916#2923916

No comments:

Post a Comment