enscript works from command line as an alias when -G is used, but fails otherwise
Test case 1:
An alias reading 'enscript -G -f "Courier9" ' <filepathname>
works as expected but with that heavy header I do not want.
The $D (date) and $N (full file name) values are implicitly picked up from the
target <filepathname> .
Test Case 2:
To produce an alternative I developed the following command line:
enscript --margins=64:64:40:40 -f Courier9 -F AvantGarde-DemiOblique10 --header='$D|$N|Page $ of $= ' <filepathname>
This works perfectly.
Test Case 3:
And so, exhilarated by this success, I built an alias to do the job and placed it in the user's .bashrc file.
alias enlistc="enscript --margins=64:64:40:40 -f Courier9 -F AvantGarde-DemiOblique10 --header='$D|$N|Page $% of $=' " <filepathname>
The result was a page with the margins I required, the correct font and size in the body of the output, but the header was another matter. The paging was correct and in the correct font and size as well, but $D and $N are absent.
What is the best way out of this? I am surprised because invoking -G brings in values for $D and $N without any explicit instruction (Case 1) whereas in (Case3)
the explicit $D and $N are ignored within the --header definition.
A leg up would certainly be appreciated ....
Last edited by gjwalsh; 10-24-2015 at 11:25 PM.
Reason: --header= ' <replacing> --header '
|