Written by marcelpetrick
on April 15, 2016
reason: too lazy to call the negfix8-script for each file itself. Because conversion is fast but even with an SSD writing the ~120 MiByte files takes some time. Precious time ..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
#!/bin/bash # author: Marcel Petrick (mail@marcelpetrick.it) # date: 20160415 # license: GNU General Public License, version 2 ( http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html ) echo "############################ start of the script ############################" #handle the issue with filenames with spaces SAVEIFS=$IFS IFS=$(echo -en "\n\b") #needed for the call of negfix8 SKRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) ALLFILES=`ls *.tif` #get all files inside the current folder which fit by suffix WORKINGDIR="negfix8Output" #todo: maybe add a check if the directory already existed .. mkdir $WORKINGDIR for FILE in $ALLFILES do CLEANEDNAME="${FILE// /_}" #also alter the original-input-name by replacing all spaces echo "will work now on #$FILE# and save as #$CLEANEDNAME#" #print current file name FULLPATH=$WORKINGDIR"/"$CLEANEDNAME".png" #convert /bin/bash $SKRIPTDIR/negfix8.sh -cs $FILE $FULLPATH done printf "############################ end of the script ############################\n" |
ps. ‘do eis’ is latin, not some german-english mumble jumble.
Leave a Reply
You must be logged in to post a comment.