LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
LinkBack Search this Thread
Old 12-04-2007, 01:32 PM   #1
corbintechboy
Member
 
Registered: Sep 2003
Location: Kentucky
Distribution: Chakra
Posts: 460
Blog Entries: 1

Rep: Reputation: 38
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?
 
Old 12-26-2007, 10:59 AM   #2
fuzzyworm
Member
 
Registered: Sep 2003
Location: Wonersh, UK & Stroud, UK
Distribution: Kubuntu, Debian, and various flavours thereof, Mandrake, my favourite being Kubuntu
Posts: 149

Rep: Reputation: 15
I'm not sure exactly what you're trying to do. If you're trying to read info from one file, and output it to another, in a slightly different format, then yes, it's possible with cygwin, but there are other more efficient ways of doing it - do you have a spreadsheet app?

If you need more help, it would help me, or whoever tries to respond, if you could explain in a little bit more detail exactly what the information that you need is, and how it could be (manually) extracted from the source data.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cygwin and space issue in a script. angel115 Programming 4 05-22-2008 07:43 AM
need help updating imagemagick on cygwin to run script babag Programming 1 01-25-2007 12:04 PM
Cygwin shell programming question Rostfrei Linux - General 6 06-30-2006 03:36 PM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
Cygwin:How do you turn the bash shell bell off? petercool Linux - Newbie 8 05-23-2003 10:48 AM


All times are GMT -5. The time now is 03:56 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration