Xref: utzoo comp.sys.sequent:817 comp.unix.questions:28432 comp.unix.misc:915 comp.unix.admin:938 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!syma!stevedc From: stevedc@syma.sussex.ac.uk (Stephen Carter) Newsgroups: sussex.general,comp.sys.sequent,comp.unix.questions,comp.unix.misc,comp.unix.admin Subject: Korn Tilde expansion Keywords: korn tilde Message-ID: <4401@syma.sussex.ac.uk> Date: 4 Feb 91 13:47:25 GMT Organization: University of Sussex Lines: 51 Sequent Dynix - Korn Shell tilde (~) expansion ---------------------------------------------- In trying to write a (very naive) script on my Sequent Symmetry running Dynix 3.0.17 we have run into a problem on tilde expansion. (Dynix is basically Berlekly Unix with an application level System V sitting on top). For those readers who know Dynix we are using SVAE. The script merely eases the problems of the operators in moving files from one user's account to another, and then remembering to change the ownership and group. It asks for 4 parameters in turn (from, to, newowner and newgroup). 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: #!/bin/ksh # . # . cuts here to make it shorter echo " from (eg /user2/pers/artemish/wp1/file1.txt) : \c" read from echo " to (eg /user2/pers/elinorm/wp1/file1.txt) : \c" read to echo " new owner (eg elinorm) : \c" # More cuts (eg testing access/ to file not existing etc) mv $from $to 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. Thanks Stephen Carter, Systems Manager, The Administration, The University of Sussex, Falmer, Brighton BN1 9RH, UK Tel: +44 273 678203 Fax: +44 273 678335 JANET: stevedc@uk.ac.sussex.syma EARN/BITNET : stevedc@syma.sussex.ac.uk UUCP: stevedc@syma.uucp ARPA/INTERNET: stevedc%syma.sussex.ac.uk@nsfnet-relay.ac.uk