Category Archives: Shell Scripting

The Go Command

Alexey Komissarouk requested a modification to the cl command that opens the argument in the default text editor if it’s a file. The go command will open the file in the editor defined by the EDITOR environment variable. Place this … Continue reading

Posted in Shell Scripting | 11 Comments

Combining cd and ls Into One Command

Andrew Braunstein and I were discussing how one might add a shell command to change a directory and list it using one command. I’m sure anyone who uses the shell is familiar with cd followed immediately by ls. A search … Continue reading

Posted in Shell Scripting | Tagged , , | 2 Comments

Automatic SOCKS Proxy for a Domestic IP Address

Update 2013-03-31: In Mac OS 10.8 (and maybe 10.7), the Airport name has been changed to Wi-Fi. The script should look like: trap “{ networksetup -setsocksfirewallproxystate Wi-Fi off; }” INT networksetup -setsocksfirewallproxy Wi-Fi localhost 3333 ssh -ND 3333 USERNAME@HOSTNAME While … Continue reading

Posted in Shell Scripting | Tagged , , , , , , , , | 1 Comment