comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Changing the title of a postscript output file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Changing the title of a postscript output file [message #46898] Thu, 12 January 2006 04:28
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
Note that my script contains a fatal flaw.

Use the following instead:

sed 's;^\(%%Title: *\).*$;\1Created by MAKE_TEST_PLOT_27, 11/1/06,
orginal name: fred.ps;' < original.eps > original-withtitle.eps

(I tested on a file without slashes in the new title, and then replaced
my title with the one you gave).

Maarten
Re: Changing the title of a postscript output file [message #46899 is a reply to message #46898] Thu, 12 January 2006 03:23 Go to previous message
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
Maarten wrote:

> sed 's/^\(%%Title: *\).*$/\1Created by MAKE_TEST_PLOT_27, 11/1/06,
> orginal name: fred.ps/' < original.eps > original-withtitle.eps
>
> (wrap it in a spawn command, using dynamic titles, and filenames etc).

Thanks Maarten - in the end I did a similar version, but a bit clunkier
due to my somewhat amateurish perl skills!

cheers,

Ben

--
Ben Panter, Garching, Germany.
Email false, http://www.benpanter.co.uk
or you could try ben at ^^^^^^^^^^^^^^^
Re: Changing the title of a postscript output file [message #46901 is a reply to message #46899] Thu, 12 January 2006 03:02 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
I don't know how to do this withing IDL. I would love to, having a
bunch of "Graphics produced by IDL" open in gv isn't helpful.

If you are on unix/linux/macosx, you can try the following (all on one
line):

sed 's/^\(%%Title: *\).*$/\1Created by MAKE_TEST_PLOT_27, 11/1/06,
orginal name: fred.ps/' < original.eps > original-withtitle.eps

(wrap it in a spawn command, using dynamic titles, and filenames etc).

Maarten
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: strmid()
Next Topic: IDL job opportunity

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 20:02:36 PDT 2025

Total time taken to generate the page: 0.03381 seconds