contents of example.sh
Code: Select all
convert resize "$1" -resize 100x100 "$1"
Code: Select all
sh example.sh "somedirectory/image.png"
Code: Select all
convert resize "$1" -resize 100x100 "$1"
Code: Select all
sh example.sh "somedirectory/image.png"
Code: Select all
#!/bin/bash
# cdpath=/.
cd $1
convert "$2" -resize 100x100 new_"$2"
mv new_$2 ../$2