🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sequent
Article #468

Re: Korn Tilde expansion

#468
From: Philippe Leclercq
Date: Tue, 05 Feb 1991 09:05
62 lines
2565 bytes
Path: bachus.enet.dec.com!leclercq
Newsgroups:
sussex.general,comp.sys.sequent,comp.unix.questions,comp.unix.misc,comp.
.unix.admin
Distribution: world
References: <4401@syma.sussex.ac.uk> 
From: leclercq@bachus.enet.dec.com (Philippe Leclercq)
Message-ID: <1991Feb5.100042@bachus.enet.dec.com>
Reply-To: leclercq@bachus.enet.dec.com (Philippe Leclercq)
Organization: Digital Equipment Corporation
Subject: Re: Korn Tilde expansion
Keywords: korn tilde

In article <4401@syma.sussex.ac.uk>, stevedc@syma.sussex.ac.uk (Stephen Carter)
writes:
|> 
|> 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.
|> 
|> 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
|> 

We have the same behavior on ULTRIX.
Substitute your last command by :

eval "mv $from $to"

It should work.

-Philippe Leclercq
  Support System Engineer
   DEC Brussels, Belgium.
Technical Details
Message-ID: <1991Feb5.100540@bachus.enet.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!bloom-beacon!deccrl!news.crl.dec.com!shlump.nac.dec.com!bachus.enet.dec.com!leclercq
References: <4401@syma.sussex.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!bloom-beacon!deccrl!news.crl.dec.com!shlump.nac.dec.com!bachus.enet.dec.com!leclercq
From: leclercq@bachus.enet.dec.com (Philippe Leclercq)
Newsgroups: comp.sys.sequent,comp.unix.questions,comp.unix.misc,comp.unix.admin
Subject: Re: Korn Tilde expansion
Keywords: korn tilde
Message-ID: <1991Feb5.100540@bachus.enet.dec.com>
Date: 5 Feb 91 09:05:25 GMT
References: <4401@syma.sussex.ac.uk>
Sender: newsdaemon@shlump.nac.dec.com
Reply-To: leclercq@bachus.enet.dec.com (Philippe Leclercq)
Followup-To: comp.sys.sequent
Organization: Digital Equipment Corporation
Lines: 62