On Mon, Sep 06, 2021 at 08:11:20AM -0400, Greg Wooledge wrote:
> The real one looks like this:
> unicorn:~$ help realpath

> realpath: realpath [-csv] pathname [pathname...]

>     Display pathname in canonical form.
>     
>     Display the canonicalized version of each PATHNAME argument, resolving
>     symbolic links.  The -c option checks whether or not each resolved name
>     exists.  The -s option produces no output; the exit status determines the
>     validity of each PATHNAME.  The -v option produces verbose output.  The
>     exit status is 0 if each PATHNAME was resolved; non-zero otherwise.
> 
> Since -v is already taken, the proposed modification used -a instead,
> 
> I have no idea why the proposal tries to write the result into an
> array variable, though.  That makes no sense to me.

Because `realpath` accept more than one *pathname*. So if you pass many
path entries to realpath as arguments, all answer could be stored into
an array.

  realpath /bin/sh /usr/bin/X

  /bin/dash
  /usr/bin/Xorg


-- 
 Félix Hauri  -  <fe...@f-hauri.ch>  -  http://www.f-hauri.ch

Reply via email to