Posts in “Shell”

ssh, sudo, tty, shell

14 Jul 2011

A nice little script snippet I like to remember for automating quick stuff across multiple hosts. -t forces tty (so sudo will work); -q quiet – disable banners; -c script (“command”) to su. Presumes sudo doesn’t prompt for a password; otherwise, see [Expect][1] and [Exploring Expect][2] :-)

vim modelines

8 Jan 2009

I can never remember what those comments that change vim settings are called, and spend hours trawling through vim’s help.

bang history

11 Sep 2007

There are three fields (separated by colons) that can be manipulated using the bang history command: