Okay, I did that (defined the function in .kshrc, which is pointed to by my
ENV variable), then envoked a new session, could see the function defined,
but when I ran it, it created the directory allright, but gave the error:
/bin/ksh: mydirectory: not found
The directory IS there. Seems like a context problem somehow. Before I ran
it I wondered if I somehow needed to source it, so the shell would inherit
the same environment after execution (so I would wind up in the new
directory), but sourcing won't work on a function. What am I missing ?
># I have been puzzling over this for a couple of hours. I am trying to
># an alias in the korn shell under Solaris 2.6 that will create a directory
># then cd to it. I know I did this once upon a time but now cannot figure
># starting out:
># alias mcd='mkdir $1;cd $1'
># It gives me a mkdir usage error. I think it is the usage of the
># command separator because
># alias mcd='mkdir $1'
># works fine. Anyone know what I am doing wrong ?
> mkdir $1 && cd $1