| Manuel Collado 2007-06-20, 9:57 pm |
| Daniel C. Bastos escribió:
> In article <f58jqg$rl2$1@news.xmission.com>,
> Kenny McCormack wrote:
> ...
> These are my systems; if I could get a solution to work on any of them,
> it would be great. Once I learn one solution, and if happens to specific
> to one of them, then I will try to mimic that somehow on the rest of the
> systems that I'd like to have it running. Whatever suggestion you have,
> it is most appreciated. I'm pairing AWK with the OS it is running on.
> ...
> %uname -a
> MINGW32_NT-5.1 SATURN 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown
If you are on WINDOWS NT/2000/XP, the native cmd.exe shell can help:
------ awkpath.bat ------------------------
@echo off
rem Lookup an AWK script
rem Look into the curent directory
if exist %1 (
echo Found: %1
exit /B
)
rem Look into AWKPATH
if .%AWKPATH%.==.. goto notfound
if .%~$AWKPATH:1.==.. goto notfound
echo Found: %~$AWKPATH:1
exit /B
:notfound
echo Not found: %1
echo AWKPATH=%AWKPATH%
-------------------------------
The script is OS specific. You can invoke it as:
...> awkpath somefile.awk
Regards.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
|