Korn Tilde expansion
Pete_Bob Apple
petebob at sequent.UUCP
Wed Feb 6 06:13:42 AEST 1991
In article <4401 at syma.sussex.ac.uk> stevedc at syma.sussex.ac.uk (Stephen Carter) writes:
>Sequent Dynix - Korn Shell tilde (~) expansion
>----------------------------------------------
>
>We want to allow the operators the option of entering (eg)
>~stevec/foo.txt instead of having to enter
>/user3/division/section/stevec/foo.
>
>However, try as we may, we cannot get the following logic (or a wide
>range of variants of it to work:
>
<shell script deleted>
>
>We have tried it with and without single quotes, double quotes, curly
>brackets...
>
>Question: Can it be done? If so how? If not on Dynix, then is this
>inability a 'feature' of Dynix.
#!/bin/ksh
# .
# . cuts here to make it shorter
echo " from (eg /user2/pers/artemish/wp1/file1.txt) : \c"
read from
eval from=$from
echo $from
Hope this helps. Ksh on Dynix is (hopefully) equivalent to ksh on any
other machine. (That's what we had in mind, anyway. :-)
--
Pete_Bob Apple Sequent Computer Systems
petebob at sequent.com, sequent!petebob 15450 S.W. Koll Parkway
Bob is not just a name.. Beaverton, Oregon 97006
It's a way of life.. (503) 626-5700
More information about the Comp.unix.misc
mailing list