duration1 and duration2 ...


 
Thread Tools Search this Thread
Special Forums IP Networking duration1 and duration2 ...
# 1  
Old 03-14-2012
duration1 and duration2 ...

Hi,

My Query ::: In attached file -- Column 1 is duration1 and column2 having a field duration2 ...

I want fields having duration1 > 3600 ,with corresponding duration2 ..

output of two fields should be like this only ---

Code:
duration1 duration2 
4209      4209

Note: Few other field were already delimited by ";", that I already filtered.

I am trying to approach like this à

Code:
cat cat*| nawk -F"|" '$43>=3600 && $2~/{print $1,$2}'|

Its giving me fields correctly but not the output I needed.

PFA file for reference ..

Help on this ..

Regards
Madhur

Moderator's Comments:
Mod Comment Please avoid excessive fonts and formatting, and please use code tags for code.

Last edited by Corona688; 03-14-2012 at 01:11 PM..
# 2  
Old 03-14-2012
Code:
awk '$1>=3600{print $1}' tick.dat && awk '$1>=3600{print $0}' tick.dat | awk -F";" '{print $18}' | awk -F":" '{print $2}'

# 3  
Old 03-14-2012
Quote:
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
Code tags will also help you get the output you want. Your original post was so mangled by fonts and extra spaces I couldn't tell what you actually wanted anymore, and I have no idea what you were trying to display in wingdings -- that won't show on many browsers. If you posted the output you wanted in code tags, you could post it precisely and everyone would see what you wanted the first time.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question