18 Aug
2007
18 Aug
'07
3:01 p.m.
fwiw, I find msys http://www.mingw.org/msys.shtml a very useful thing anytime I need to do any shell scripting on windows. Thanh On Sat, Aug 18, 2007 at 11:48:29AM +0200, David Kastrup wrote:
But this does not hold a candle to programming cmd.exe. Something like
for i in /opt /usr/local /opt/* /usr/local/* do if test -d "$i"/software then cd "$i" subdir="$i" break fi done
becomes (in a batch file, on the command line it looks different)
for /D %%I in (C:\ D:\ C:\* D:\*) do ( if exist %%I\software\NUL ( %%~dI cd %%~pnI set subdir=%%I goto found ) )
[...]