You're replying to a comment by Antti Haapala.

Antti Haapala Permalink
March 21, 2010, 16:48

All these shell examples work very well in zsh too. However, with sudo !! you can see the command that is about to be run if you are using zsh... just press TAB after !! and it will expand the command from history there.

Also, another nice trick I discovered today... Many times I have had to download numbered files with wget. I used to use for loop and printf, both of which are cumbersome. In zsh, however, you can type wget http://host/directory/file{0001..1926}.ext to download 1926 files named fileNNNN.ext. Pretty neat. {n..m} kind of works in bash but bash eats the leading zeros, so instead of file0001.ext you will be trying to retrieve file1.ext.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "rocket_195": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.