I'm trying to write a small bash script that'll convert source files in a directory to a .pdf. The steps are theseLocate files with findexecute iconv on the files converting the character encoding from utf-8 to iso-8859-1 via finds -execpass this output through enscript and eventually ps2pdfThe only reason I've added iconv is that enscript does not support utf-8.So far I've made the following mess:#!/bin/bashenscript --portrait --columns=1 --header ' $n|'$2'|%F  Page $% of $=' --highlight='java' --line-numbers --output='-' --color --font='Courier8' `find $1 -name '*.java' -type f -exec iconv -f utf-8 -t iso-8859-1 {} +` | ps2pdf - $2'.pdf'Running it give me this output: enscript: invalid option -- ',' Try `enscript --help' for more information.Edit:It did not give that error before I added -exec iconv.2. edit:The original formulation I made was vague I see now. Heres the original script I tried to modify:#!/bin/bash`which enscript` --portrait --columns=1 --header ' $n|'$2'|%F  Page $% of $=' --highlight='java' --line-numbers --output='-' --color --font='Courier8' `find $1'/src/' -name '*.java'` | ps2pdf - $2'.pdf'./script.sh target_dir output_file_nameThe original script combines all source files  in a folder recursively into one single pdf with each file starting at a fresh page. Maybe I just got to live with having to do this in two steps. First converting charset and then converting to pdf.
Combining enscript, find, iconv and ps2pdf
command line;find;pdf;enscript