1827893 Members
1791 Online
109969 Solutions
New Discussion

awk problem..

 
amonamon
Regular Advisor

awk problem..

Hello..
Please I have a file as follows:

file1:
name1_operation120060613111041
name2_operation2tr320060614111043
name3_operation3ar20060615111042
name4_operation44420060616111041
etc..

so difference is in name operation date and time

name is for example name1
operation is for example operation2
date is for example 20060616
and time is 1041

also note that operation string is different always once it is
operation444 and second time it is operation2tr3

there are only those 4 kinds of operations..

how can I sort and create 4 different files for 4 operations and add those lines that have operation operation1 in one file others that have operation operation2tr3 in secont file in 3. file operation3ar operation lines, and in 4. operation444 ..

any hints or help code??

cheers
1 REPLY 1
Michael Schulte zur Sur
Honored Contributor

Re: awk problem..

Hi,

grep opereration1 file > file1
grep opereration2 file > file2
grep opereration3 file > file3
grep opereration4 file > file4

greetings,

Michael