getting absolute path of a file in csh?

Tom Metro blu at vl.com
Tue Aug 8 12:26:00 EDT 2006


Robert La Ferla wrote:
> In a csh script, how do you get the absolute path of a filename?
> If the cwd is "/users/myacct" and there is a file called "filename.dat", 
> I want a command (built-in or external)  that given the argument 
> "filename.dat", returns "/users/myacct/filename.dat".

set file="filename.dat"
echo "$cwd/$file:t"

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/



More information about the Discuss mailing list