I am trying to create a simple script which will resize images. Here it is:
#!/bin/bash
echo "Script executed from: ${PWD}"
#copy image and resize it
OUTPUT_IMG="newimg.png"
PATH="${PWD}/${OUTPUT_IMG}"
cp "$1" ${OUTPUT_IMG}
mogrify -resize 400x300 ${PATH}
I am calling script with 1 parameter (image to be resized)
script thisImage.png
But I get error cp command not found
and mogrify command not found
.
All this works without a script meaning that I have installed all these apps.
Any ideas?