|
Member
Registered: Sep 2003
Location: Kentucky
Distribution: Chakra
Posts: 460
Rep:
|
Help with Cygwin shell script?
Hello,
I am trying to do some hobby stuff in windows (lack of software for linux).
A friend told me I might be able to use Cygwin and make a script to conver these text files. Here is what I need:
Text for this:
04796.0 TAN028: POL Mil 1754 USB/ALE clg KOS021 (27/SEP/07) (KK)
04815.5 4N7R: PoF ALE/USB (18Oct07) 0630 CLG "AZWE" (bc)
04815.5 4XKM: PoF ALE/USB (18Oct07) 0604 CLG "RBYG" (bc)
Huge amount of text formatted to this:
"Ale",1.904000,USB,2550,3,1000,0,"","","0000","2400","Notes",0,0
"Unknown",1.915000,USB,2550,3,1000,0,"","","0000","2400","Notes",0,0
"Sitor",1.916700,USB,2550,3,1000,0,"","","0000","2400","Notes",0,0
"Unknown",2.064000,USB,2550,3,1000,0,"","","0000","2400","Notes",0,0
"Ale",2.070000,USB,2550,3,1000,0,"","","0000","2400","Notes",0,0
"Ale",2.070500,USB,2550,3,1000,0,"","","0000","2400","Notes",0,0
Is this possible? I could auto tell grep (or whatever) that they are all USB and to search for Ale or CW etc and if not found to insert unknown in first field?
Let me describe second text set:
"Ale (name)",1.904000 (frequency)",USB (mode)",2550 (filter),3 (agc setting),1000 (step size), rest are misc numbers that need inserted but hold no importance.
Is this possible?
|