help with syntax...filepro 5.0.13 OSR 5.0.7
Kenneth Brody
kenbrody at bestweb.net
Thu Jan 19 18:47:19 PST 2006
Quoting Enrique Arredondo (Thu, 19 Jan 2006 17:09:38 -0800 (PST)):
> I'm trying to generate a file that will make hundreds of symbolic links
> but I'm missing the right combination of 's and `s within the system
> noredraw command.
>
> here's where the magic takes place :
>
> Then: system noredraw "umask 0;cd /vegedoc;FI=`find . -name"<imp(4){".pd
>
> f -print`;echo 'ln -s $FI"<dd{"' >> /usr2/tmp/foundit"
>
> the outfile being created looks like this :
>
> ln -s $FI
> /vegedoc/CoreCenter/AMC/AMC-150/1---A22-EnsambleDeMotor/E-150-A22.pdf
>
> The $FI becomes not a variable when you put in between 's but if I don't
> put the 's the system tries to execute a ln command.
>
> if I replace the echo part with " ; echo $FI >> /usr2/tmp/foundit"
>
> I get the real value of $FI.
>
> Can you find the problem ??
The shell won't expand variables within single quotes. Use double
quotes -- CHR("34") -- instead. (In fact, are the quotes even
necessary here?)
You could also skip putting it in a variable and then using that
variable. In other words, instead of:
FI=`command` ; echo "something $FI more stuff" >filename
you can do:
echo "something `command` more stuff" >filename
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list