On Wed, 2006-08-09 at 16:15 +0100, Paul Howarth wrote: > Why use three commands when one will do? > > ssh $HOST 'awk '\''/^#.*root=/ { dev=$NF; sub("root=", "", dev); > print > dev }'\'' /boot/grub/grub.conf' Ah, but it's fun to see how many piped commands you can run on one command line. I remember we had to do some thrashing of data from an Oracle database to find out what records were out of sync with the LDAP server (don't ask, I just did the hacking; I have no idea what the heck they were doing with a setup like that). Anyway, we also wanted to try and not reuse the same command twice. We almost made it. We ended up using grep x 2, sed, awk, perl & tr. -- Boring Home Page - http://www.webtrek.com/joe See my blog, sumo game ranks and other interesting junk