[KLUG Members] sed, regexp, and my tired brain

Adam Tauno Williams adam at morrison-ind.com
Wed Jun 1 10:03:37 EDT 2005


Grrrk.

I figured it out.

cat $5  | (echo -e "\000\c"; cat | sed "s/^\/\/ /epsf[c]{/" | sed
"s/[ ]*noff/.eps}/g") | enscript -e | sendfax -T 5 -D -f
$USER at mormail.com -h hylafax -d 2

Now the crappy COBOL application which wants to send stuff to VisiFAX
thinks it is doing so, and the job gets bounced over to the HylaFAX
server, logos and all. 

ahhh...

> I need to convert a string like
> // /usr/lib/fax/logo.mie       noff
> to
> espf[c]{/usr/lib/fax/logo.mie}
> 
> i've gotten as far as -
> sed "s/^\/\/ /epsf[c]{/"
> - which replaces the //
> 
> But I'm having a brain fart and can't come up with the reg exp to match
> up the remainder up to the first whitespace.
> 
> _______________________________________________
> Members mailing list
> Members at kalamazoolinux.org
> 



More information about the Members mailing list