Hacker News new | past | comments | ask | show | jobs | submit login
The Next Ten One-Liners from CommandLineFu Explained (catonmat.net)
48 points by pkrumins on March 24, 2010 | hide | past | favorite | 5 comments



Ah, what a cool page that CommandLineFu is... :)


I didn't know that pipes can work with remote commands before, what amazing combinations!


They don't -- they work with the local ssh command. Its just that ssh when invoked with a "command argument" runs that command instead of a shell, with the stdin and stdout being run through the network.

The end result is similar to what you said, but the mechanism is different, the pipe itself is strictly a local construct.


Thanks for pointing out that :)


My favorite is the modifier for histories.

$ ls a b c

a b c

$ ls !$

ls c

c

$ ls a b c

a b c

$ ls !:3 !:2 !:1 !:0

ls c b a ls

ls: ls: No such file or directory

a b c

$




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: