Need help to convert Unix Shell Script to DOS Batch Script
Posted: 19 Jul 2015 07:39
I have got a little Unix Shell Script for a freeare program called ImageMagick.
There is also a ImageMagick version for Windows and I want to implement a certain task by using a corresponding DOS batch script.
The Unix Shell Script lok like:
How does the DOS batch script look like?
Mind the backticks which tell the shell script interpreter to execute everything inside and assign the result to the variable "test"
Furthermore I am asking how to mask the% percentage inside the parametr list
Maybe someone can help
Thank you
Peter
There is also a ImageMagick version for Windows and I want to implement a certain task by using a corresponding DOS batch script.
The Unix Shell Script lok like:
Code: Select all
test=`convert image.jpg -format "%[fx:(w/h>1)?1:0]" info:`
if [ $test -eq 1 ]; then
convert image.jpg -resize 800x result
else
convert image.jpg -resize x800 result
fi
How does the DOS batch script look like?
Mind the backticks which tell the shell script interpreter to execute everything inside and assign the result to the variable "test"
Furthermore I am asking how to mask the% percentage inside the parametr list
Maybe someone can help
Thank you
Peter