little help : convert .bat to bash script
Posted: 2019-04-09T01:24:49-07:00
Hi,
I made a little script in .bat file running on windows, but I need it now in mac os X, so in bash,
but I didn't know how to convert argument in it :
the script is very simple, it compare 2 files :
I didn't find how to translate the argument very useful with the for command in dos :
%I
%~pI
%~NI
Thanks for your help,
Christian
I made a little script in .bat file running on windows, but I need it now in mac os X, so in bash,
but I didn't know how to convert argument in it :
the script is very simple, it compare 2 files :
It compare in each subfolders the files with the name and the name_1 and then the result at the top of subfolders.@FOR /r %%I in (*.jpeg) do ("C:\Program Files\ImageMagick\magick.exe" compare %%I %%~pI%%~NI_1.jpeg %%~NI-compare.jpeg)
I didn't find how to translate the argument very useful with the for command in dos :
%I
%~pI
%~NI
Thanks for your help,
Christian