Last active
May 2, 2019 19:57
-
-
Save ilkayisik/770cb752b6995d25b14d9e24cbbb08b7 to your computer and use it in GitHub Desktop.
various bash operations in one file including forloop, listing all files in a directory, manipulate names to create output name, change backgeound color with image magick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root=pat/to/root | |
cd ${root} | |
for tiffile in *.tif; do | |
echo $tiffile | |
in_file=${tiffile} | |
out_file=${in_file%.*}_whitebg.tif | |
convert -fill white -opaque black ${in_file} ${out_file} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment