Help with translating bash script for Windows
Posted: 2017-11-04T04:05:39-07:00
hi everyone. So I have the below script to generate contact sheets for large image files in bash/Linux. However I need to transfer this to Windows notebook at work (I am not allowed to instull Linux there).
I have installed ImageMagic for Windows
I am just so lost at how to make it all work in either command line or Window's powershell. I am still reading, but it takes time. Perhaps any advanced Windows professionals would help me with translation of the below code for Windows? I would be so very grateful. Thanks so much
It would be perfect to just make any executable file and run it in specific folder, just like I have .sh bash scripts with the above code
I have installed ImageMagic for Windows
I am just so lost at how to make it all work in either command line or Window's powershell. I am still reading, but it takes time. Perhaps any advanced Windows professionals would help me with translation of the below code for Windows? I would be so very grateful. Thanks so much
Code: Select all
IFS=$'\n'
mkdir n;
for f in `find . -iname "*jpg"`; do
convert $f -set option:mylabel "%wx%h\n%f" -verbose -font Helvetica -pointsize 15 -geometry 200x200+2+2 -auto-orient -resize 200x200 -fill 'gray' -gravity center label:"%[mylabel]" -append n/$f;done
cd n;
montage -font Helvetica -pointsize 10 -background '#FFFFFF' -fill 'gray' -geometry 300x300+2+2 -auto-orient * contact-light.jpg
mv contact-light.jpg ../
cd ../
rm n -rf