[Scottish] storing current directory

iain d broadfoot ibroadfo at cis.strath.ac.uk
Thu Jan 22 15:48:37 GMT 2004


* Mark McRitchie (Mark.McRitchie at salamis.co.uk) wrote:
> > -----Original Message-----
> > From: Elwell, AD (Andrew) [mailto:A.D.Elwell at dl.ac.uk] 
> >
> > >     export AMB_TMP=pwd
> > 
> > welcome to backticks...
> 
> Or... You can use 
> AMB_TMP=$(pwd)
> 
> Using the $(<cmd>) structure in bash means you can easily nest commands
> which backticks make difficult/impossible.

$ echo `file \`find tmp\`|grep text|cut -f1 -d:`
tmp/beneath_a_steel_sky.txt

iain

-- 
"If sharing a thing in no way diminishes it, it is not
rightly owned if it is not shared." -- St. Augustine
#rm -rf /
http://www.geeksoc.org/



More information about the Scottish mailing list