This page’s menu:
a=`ls | grep eps`;for b in $a; do echo " gv $b & ">>alleps.sh; done; #chmod 765 alleps.sh; `sh ./alleps.sh`; rm alleps.sh;Don't forget to make it executable:
#chmod 765 showalleps.sh
ps2pdf -dEPSCrop file.eps file.pdf
#!/bin/bash
set -o posix
echo "all .eps files will be converted into .pdf";
# Find all eps files in the current directory, and convert them
list=`ls | grep eps`;
for each in $list; do
name=${each%%????};
ps2pdf -dEPSCrop $name.eps $name.pdf
done;
# Now combine all pdf files into one pdf file:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH *.pdf
echo "Done!";
# Automatically show the results
`acroread combinedpdf.pdf &`
#!/bin/bash set -o posix # $1 is the value to look up, $2 is the one to replace it with # eg chname.sh 103 89 old=$1; new=$2; list=`ls | grep $old`; for each in $list; do eachnew=`echo $each | sed s/$old/$new/g`; mv "$each" "$eachnew"; done; echo "Moved all $old to $new.";Simple to use, just write:
#chname.sh 103 89and all the files with the number 103 in the filename will be changed into files with 89 in the filename instead.
#!/bin/bash # upper2lower - convert all files in a directory from upper # to lower case filenames and replace spaces with _ for f in *; do # turn all spaces into underscores mv \"$f\" `echo \"$f\" | tr [:space:] _` done for g in *; do # make all characters lowercase mv $g `echo $g | tr A-Z a-z` done # EOF
Call the function by using:
Last modified: February 04 2012 21:42:12.