%% "Aditya Kher" <[EMAIL PROTECTED]> writes:

  >> cd to arg, then echo full dir name.  is there a simpler or built-in
  >> way that's better?

  ak> the unix command dirname gives the directory name
  ak> see also basename for getting file name in a similar manner

dirname and basename are simply string munchers: they break up strings
on "/" etc.  They do NOT evaluate their arguments to find
fully-qualified pathnames.

In addition, the make functions $(dir ...), $(notdir ...), $(basename ...),
etc. are much better/faster for this kind of thing, as long as you don't
need to work on a shell variable.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to