Sed Question

Jared Anderson PluggedIn at TheGoldenEdge.Com
Fri Aug 19 13:38:35 MST 2005


How can I accomplish the following without using the pipes?

I have this: 
--------------------------
0x0128|Inch                                                                    
0x829a|1/60 sec.                                                               
0x829d|f/3.5                                                                   
0x9003|2005:08:19 12:08:36                                                     
0x9004|2005:08:19 12:08:36   
---------------------------

I do this to it:
----------------------------
sed -n "/0x9003|/p" | sed -s "s/ *$//" | sed -s "s/0x9003|//g" | sed -s "s/:/./g" |
sed -s "s/ /_/g"
----------------------------

I get this:
--------------------
2005.08.19_12.08.36
--------------------

It works, but kinda ugly.  Is there a better way?

TIA


More information about the PLUG-discuss mailing list