![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| concatenate and display 2 lines as 1 with a condition for 2 line ? | vithala | Shell Programming and Scripting | 7 | 07-10-2008 10:01 PM |
| searching and storing unknown number of lines based on the string with a condition | swamymns | Shell Programming and Scripting | 7 | 05-12-2008 10:02 PM |
| How to enter if-then condition on command prompt/line ? | mpc8250 | Shell Programming and Scripting | 3 | 02-10-2008 09:27 AM |
| display lines after a particular line number | rajashekar.y | UNIX for Dummies Questions & Answers | 6 | 01-03-2007 12:53 AM |
| how to concatenate two command in one line and get the display in one screen | vasikaran | UNIX for Dummies Questions & Answers | 9 | 07-01-2005 02:41 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need solution concatenate and display 2 lines as 1 with a condition for 2 line ?
I have 2 pattern of lines (SQL query and Time taken)in a log i need to capture all SQL queries with time taken >20 sec and need to display as one line.
2 lines from log: 2007-10-23 11:39:17,061 DEBUG [server.startup : 1] [com.fourcs.clm.fw.pem.CLMPEMDBService] - SQL Query : SELECT A.GROUP_CD , C.FN_CD FROM UP_GROUP A , PRD_GROUP_TO_FN B , PRD_FN C WHERE A.GROUP_ID = B.GROUP_ID AND B.FN_ID = C.FN_ID ORDER BY A.GROUP_CD 2007-10-23 11:39:17,061 DEBUG [server.startup : 1] [com.fourcs.clm.fw.pem.CLMPEMDBService] - Time Taken : 640 i have tried to display results Time taken > 20000 by using a command but i want this results to be concatenated with above line(SQL Query line) for Time taken > 20000 Commands: cd /logs/WS/apps/logs grep -i 'Time Taken :' /logs/WS/apps/logs/SQLPerformance_x1prdapp7*Node01_C*S*.log > /export/home/jftl784/script/Latest_SQLTIME_TMP.txt awk '$12 > 20000 {print $0}' < /export/home/jftl784/script/Latest_SQLTIME_TMP.txt > /export/home/jftl784/script/Latest_SQLTIME_TMP_2.txt grep -v 'Non-deferrable Alarm :' < /export/home/jftl784/script/Latest_SQLTIME_TMP_2.txt > /export/home/jftl784/script/Latest_SQLTIME_MSGS_$1.txt |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
No duplicate or cross-posting, read the rules.
Proceed here: concatenate and display 2 lines as 1 with a condition for 2 line ? Thread closed. |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|