Re: is it correct to specific a path name like this
On Fri, Jun 13, 2003 at 01:22:00AM -0400, try_email_me@yahoo.ca wrote:
> Hi everyone,
>
> I am writing some shell scripts, but I run into some problems.
> I have a dir name which has space in it. I know this is bad but I can't
> avoid it. I am forced to deal with this situation. How do I set a
> variable that contain the dir name which has space in it. I tried
> several ways:
>
> $PDB=~/.kde/share/apps/kpilot/DBBackup/Cool Joe/AddressDB.pdb
> $PDB="~/.kde/share/apps/kpilot/DBBackup/Cool Joe/AddressDB.pdb"
> $PDB='~/.kde/share/apps/kpilot/DBBackup/Cool Joe/AddressDB.pdb'
>
> ls $PDB
>
> give me error. is there a way or no way?
When setting a variable in a shell script you set it without the "$"
like -
PDB='~/.kde/share/apps/kpilot/DBBackup/Cool Joe/AddressDB.pdb'
and then call it with $PDB.
$ echo $PDB
hth,
kent
--
"I am always doing that which I can not do,
in order that I may learn how to do it." --Pablo Picasso
Reply to: