
Just a question about a shell script
I have a script that has aliases in it. One of my co-workers didn't like
how I was doing it.
Basically imagine a large multi-line file that looks like this:
alias comp1="/usr/openwin/bin/xterm -bg black -fg green -fn fixed +cn -T
comp1 -n comp1 -j -sb -si -sk -sl 2000 -wf -geometry 80x40 -e
/usr/bin/rlogin -l root comp1.dom.com &"
I don't mind having the large file, it's easy to yank/paste/replace what I
need. But it's a mental exercise, and I said sure, what the hell.
So I've gotten to this point where the file I keep the aliases looks
something like this (shortened for testing purposes):
XTERM='/usr/openwin/bin/xterm -T $1 -e rlogin -l root $2'
alias test='$XTERM comp1 comp1.dom.com`
The two problems I'm having (and I didn't realize until just recently that
there was a second) was that 1. I can't get rlogin to exec using the -e
option. 2. I'm unfamiliar with how in a script to use a command line arg
such that $1 and $2 take what I'm giving them, e.g. comp1 and comp1.dom.com
I've looked at xargs (man xargs) but I'm not sure if that's what I want/need
to use or not.
Thanks,
-J