OT: scripting, removing trailing ^L
Jim Asman
jlasman at telus.net
Fri Dec 23 10:05:09 PST 2005
--------------- Original Message ---------------
> At 12:00P Fri Dec 23 2005, Bob Stockler wrote:
> William James McEachran wrote (on Fri, Dec 23, 2005 at 11:19:16AM -0500):
>
> | Slightly off-topic.
> | The data comes from filePro, some of it passes thru 'gnuplot', and in
> | the end the gnuplot graph is incorporated into the filepro output form.
> | The whole thing then is converted with 'pcl6'/ghostpcl into a PDF file
> | Result, a PDF file with data & a graph.
> |
> | gnuplot adds an unneed "^L" to the end of the graph pcl file. I've got
> | to come up with a way to remove just this one character at the end of the
> | file. I've got a mental block on removing just the final character.
> |
> | sed? awk?
>
> How about tr?
>
> tr -d '\014' <file1 >file2
>
>
Well, we don't know if a ^L can exist legitimately elsewhere in the
file. Certainly, any raster images could contain ^L's. So a blanket
removal of all such characters may not be appropriate.
Jim
--
jlasman at telus.net Spectra Colour Services Ltd.
Jim Asman 10221 144A Street
Phone: (604)584-0977 Surrey, BC V3R 3P7
Cell: (604)619-0977 CANADA
More information about the Filepro-list
mailing list