I like your script. However, it could be improved, imho. In "behavior" (commands preferably keep the input still, print a message when something unexpected happens, accept --help and -h), in features (processing several files at once looks useful, portability to other shells is nice, removing the output if gs's execution fails, e.g., if an input file does not exist) and in "style" (removing the .PDF or .pdf extension before appending "-compressed.pdf" looks nicer to me, 'ls' is not the simpler way to get the size, kind of useless variables, accessed with unnecessary curly brackets). See the attached file for "my" version of this script. Feel free to distribute it under whatever free software license you want.

Again, do not get me wrong: I like your script.

Reply via email to