groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] gtroff & soelim don't recognize ~ in paths


From: Keith Marshall
Subject: Re: [Groff] gtroff & soelim don't recognize ~ in paths
Date: Tue, 11 Apr 2006 05:07:51 +0100

On Tuesday 11 April 2006 4:08 am, Greg 'groggy' Lehey wrote:
> > And you might also consider this, in the bash *shell*:
> >
> >   $ dir='~'
> >   $ ls $dir
> >   ls: ~: No such file or directory
>
> Arguably that's a bug in bash.

Nope.  It's completely analogous to:

  $ dir='$HOME'
  $ echo $dir
  $HOME
  $ eval echo $dir
  /home/keith

and this is perfectly correct Bourne shell behaviour, well understood, 
and fully documented -- shell variables undergo only one round of 
expansion at each `eval'; they are never recursively expanded.

Regards,
Keith.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]