[geeks] tcsh question

alex j avriette avriettea at speakeasy.net
Sat Jun 8 16:05:59 CDT 2002


i'd like to make an 'sshcat' alias, which would work like this:

tar cf - dir1 dir2 | gzip - | sshcat alex at remote foofile.tgz

which would expand to:

tar cf - dir1 dir2 | gzip - | ssh alex at remote 'cat > foofile.tgz'

now i already have an alias, vimscape, which does something similar:

alias vimscape 'wget -qO - \!* | vim -'

which when used thusly:

vimscape http://www.google.com/

expands to:

wget -qO - http://www.google.com/ | vim -

this is cool. but i cant seem to figure out (from the manpage or from 
tinkering with the shell) how to reference specific arguments from 
_this_ command, rather than a previous command. \!* aint enough, i need 
\!:-1 and \!$. anyone know how to do this?

thanks,
alex

(replies that X shell is better are unnecessary)

--
alex j avriette, perl hacker
avriettea at speakeasy.net
http://envy.posixnap.net/



More information about the geeks mailing list