1827294 Members
2162 Online
109717 Solutions
New Discussion

awk help

 
Cem Tugrul
Esteemed Contributor

awk help

hi everybody,
i have 600 files and have to get some informations from that files..let's suppose
file1;
1386 bbbb
ccc 1ks983 hsd823
file2;
2190 gd73 1212
bbbb ccc
ksd xyz
file3;
2145 h723 bbbb
ccc
so i want to search some spesific strings for these files and want to see in some optional headers like below;

type: os: pack:
1386 bbbb ccc
2190 bbbb ccc
2354 bbbb ccc

so how can i manipulate these 600 files and get the strings informations and put optional headers information?

Our greatest duty in this life is to help others. And please, if you can't
4 REPLIES 4
Kent Ostby
Honored Contributor

Re: awk help

I need a bit more information.

What are the possible values of OS and Pack that will be showing up. Give a couple of examples please.

Then it should be fairly easy to code in awk.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Rodney Hills
Honored Contributor

Re: awk help

I don't see the pattern.

Do you grab the first field of the first record and look for "bbbb" and "ccc" and tack them together as one line?

Need more definition...

-- Rod Hills
There be dragons...
Cem Tugrul
Esteemed Contributor

Re: awk help

hi Kent,
Thank's so much for your kind concern...
sorry for insufficient data..these files are
*.csv and produced for clients from our network login.bat via freeware software so
every file like computername.cvs included
machine name,Os type &language,service pack
etc..
so for Os value is 1386 means NT,2195 for
W2k and 2600 for XP,service pack for 3846
and there are a lot of hardware&software information in csv file but now i only need
these information...
Our greatest duty in this life is to help others. And please, if you can't
Cem Tugrul
Esteemed Contributor

Re: awk help

Thank's but no neeed to think about it...
Our greatest duty in this life is to help others. And please, if you can't