Convert all eps files into jpeg copies in current directory and lower.
#!/usr/bin/bash
for f in $(find -type f -iname '*.eps')
do
dest=`echo ${f%.*}`
echo "${f} to ${dest}.jpg"
convert "${f}" "${dest}.jpg"
done
useful tidbits for using open source software in science
Convert all eps files into jpeg copies in current directory and lower.
#!/usr/bin/bash
for f in $(find -type f -iname '*.eps')
do
dest=`echo ${f%.*}`
echo "${f} to ${dest}.jpg"
convert "${f}" "${dest}.jpg"
done
This bash script will find all the files matching the pattern *foo.txt.
#!/usr/bin/bash
for f in $(find -type f -name '*foo.txt')
do
echo "removing ${f}."
rm "${f}"
done
Use -iname for case-insensitive, which will even match hidden files (files with a leading dot).
The -type f means only find regular files.