Writing shell scripts
some script examples
#!/bin/bash -f
# this script creates a resized copy of specified size of all the jpg files in current directory
# and places the result into the subdirectory "new"

for x in *.jpg; do
	echo $x
	convert $x -resize 1280 new/$x
done
 

#!/bin/bash
# parameter: directory containing jpg files
# creates a list of html tags to display all jpg files in a directory

for x in $1/*.jpg; do
        echo "<img src=\"$x\">";
done