Name: Anonymous 2012-11-21 14:35
I need help with creating a bash script
It's supposed to save a file name (minus the extension, let's say extension is .eri) to a variable, from the directory (directory is full of .eri files of different names) and then save it as <filename>.png to another folder.
There's about 100 .eri files and the converting is handled by the external application, but it's made horribly and it doesn't support wildcards correctly.
converter ~user/vnimages/<filename>.eri ~user/hentaipics/<filename>.png
Wild cards are correcly handled by the source files (so that [..]vnimage/*.eri works, but [..]*.png doesn't and it just saves all the files as *.png, overwriting them all.
something along
converter ~user/vnimages/$filenameminusextension.eri ~user/hentaipics/$filenameminusextension.png
in a loop could work, but I have no idea how to do that.
Help.
It's supposed to save a file name (minus the extension, let's say extension is .eri) to a variable, from the directory (directory is full of .eri files of different names) and then save it as <filename>.png to another folder.
There's about 100 .eri files and the converting is handled by the external application, but it's made horribly and it doesn't support wildcards correctly.
converter ~user/vnimages/<filename>.eri ~user/hentaipics/<filename>.png
Wild cards are correcly handled by the source files (so that [..]vnimage/*.eri works, but [..]*.png doesn't and it just saves all the files as *.png, overwriting them all.
something along
converter ~user/vnimages/$filenameminusextension.eri ~user/hentaipics/$filenameminusextension.png
in a loop could work, but I have no idea how to do that.
Help.