trying to script a command line
Craig White
craig at tobyhouse.com
Wed Mar 5 14:53:46 MST 2008
On Wed, 2008-03-05 at 14:14 -0700, Charles Jones wrote:
> Craig White wrote:
> > OK - truly simplifying my issue to a point where someone should be able
> > to explain this to me...
> >
> > # my starting file
> > $ cat test-db.txt
> > A 1
> > B 2
> > C 3
> >
> > # this is what I want
> > $ cat test-db.txt | cat test-db.txt | sed 's/ /\\ /g' | sed ':a;N;$!
> > ba;s/\n/ /g'
> > A\ 1 B\ 2 C\ 3
> >
> > # but if I aggregate the command inside backticks, I lose the
> > # escaped spaces part of the sed command...
> >
> What about adding an additional backslash, ie sed 's/ /\\\ /g'
----
yep...I increased it from 1 to 2 but 3 was the lucky charm.
still issues but I think they are specifically pdftk issues now.
Thanks
Craig
More information about the PLUG-discuss
mailing list