Sponsored Content
Top Forums Shell Programming and Scripting awk using sub , filtering textfile Post 302733899 by only4satish on Wednesday 21st of November 2012 09:13:51 AM
Old 11-21-2012
Code:
CMF_COMP_ELEM_GSM2_B71.WORLD_20121114130908.log   107496444 rows inserted into ALL_S1_CMF_COMP_ELEM.
CMF_COMP_ELEM_GSM3_B71.WORLD_20121114130908.log   110729006 rows inserted into ALL_S1_CMF_COMP_ELEM.
CMF_COMP_ELEM_GSM4_B71.WORLD_20121114130908.log   92549475 rows inserted into ALL_S1_CMF_COMP_ELEM.
CMF_COMP_ELEM_GSM5_B71.WORLD_20121114130908.log   35606251 rows inserted into ALL_S1_CMF_COMP_ELEM.
DDL_KKR_CSK_GSM2_B71.WORLD_20121114130908.log   107496444 rows inserted into ALL_S1_DDL_KKR_CSK.
DDL_KKR_CSK_GSM3_B71.WORLD_20121114130908.log   110729006 rows inserted into ALL_S1_DDL_KKR_CSK.
DDL_KKR_CSK_GSM4_B71.WORLD_20121114130908.log   92549475 rows inserted into ALL_S1_DDL_KKR_CSK.
DDL_KKR_CSK_GSM5_B71.WORLD_20121114130908.log   35606251 rows inserted into ALL_S1_DDL_KKR_CSK.

lets say i have a text as abve, i want a line between CMF and DDL logs.... how can i do it ? .... no substitute just separation line is required

---------- Post updated at 07:43 PM ---------- Previous update was at 07:42 PM ----------

Code:
expedted output :


CMF_COMP_ELEM_GSM2_B71.WORLD_20121114130908.log   107496444 rows inserted into ALL_S1_CMF_COMP_ELEM.
CMF_COMP_ELEM_GSM3_B71.WORLD_20121114130908.log   110729006 rows inserted into ALL_S1_CMF_COMP_ELEM.
CMF_COMP_ELEM_GSM4_B71.WORLD_20121114130908.log   92549475 rows inserted into ALL_S1_CMF_COMP_ELEM.
CMF_COMP_ELEM_GSM5_B71.WORLD_20121114130908.log   35606251 rows inserted into ALL_S1_CMF_COMP_ELEM.
========================================================================================================
DDL_KKR_CSK_GSM2_B71.WORLD_20121114130908.log   107496444 rows inserted into ALL_S1_DDL_KKR_CSK.
DDL_KKR_CSK_GSM3_B71.WORLD_20121114130908.log   110729006 rows inserted into ALL_S1_DDL_KKR_CSK.
DDL_KKR_CSK_GSM4_B71.WORLD_20121114130908.log   92549475 rows inserted into ALL_S1_DDL_KKR_CSK.
DDL_KKR_CSK_GSM5_B71.WORLD_20121114130908.log   35606251 rows inserted into ALL_S1_DDL_KKR_CSK.

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

formatting textfile inside ksh script using awk not working

I cannot seem to get this text file to format. Its as if the awk statement is being treated as a simple cat command. I manned awk and it was very confusing. I viewed previous posts on this board and I got the same results as with the the awk command statement shown here. Please help. ... (6 Replies)
Discussion started by: tekline
6 Replies

2. UNIX for Advanced & Expert Users

awk filtering ?

I have a Ques. Regarding awk I have few strings in a file, like.. ABC DEF_ABC GHI_ABC GHI Now I want string which has only 'ABC', not the part of any other string as it is also present in 'DEF_ABC' Output should be ABC Please guide me asap !! Thanks :b: (4 Replies)
Discussion started by: varungupta
4 Replies

3. Shell Programming and Scripting

awk and sed filtering

Goo afternoon Sir'sould like to ask your help reagrding in this scenario using sed and awk. ******************************************************** Host:CDRMSAPPS1 Operating System:Linux 2.6.9-42.ELsmp Machine Type:UNIX Host Type:Client Version:5.1... (2 Replies)
Discussion started by: invinzin21
2 Replies

4. Shell Programming and Scripting

awk search strings from array in textfile

I am wanting to take a list of strings and loop through a list of textfiles to find matches. Preferably with awk and parsing the search strings into an array. // Search_strings.txt tag string dummy stuff things // List of files to search in textfile1.txt textfile2.txt The... (6 Replies)
Discussion started by: sdf
6 Replies

5. Shell Programming and Scripting

filtering with awk

i have question about awk ex: input.txt 1252468812,yahoo,3.5 1252468812,hotmail,2.4 1252468819,yahoo,1.2 msn,1252468812,8.9 1252468923,gmail,12 live,1252468812,3.4 yahoo,1252468812,9.0 1252468929,msn,1.2 output.txt 1252468812,yahoo,3.5 1252468812,hotmail,2.4 msn,1252468812,8.9... (3 Replies)
Discussion started by: zvtral
3 Replies

6. Shell Programming and Scripting

filtering a numeric value which has '%' using awk

Hello Gurus, I have a requirement where I have to filter a value from some field which has 99% or greater than '99%'.. For ex: The Date (file -- sample.csv) will be like below Field1,Field2,Field3,Field4 860440512,844284992,16155520,99% 860440512,844284992,16155520,94%... (4 Replies)
Discussion started by: raghu.iv85
4 Replies

7. Shell Programming and Scripting

awk data filtering

I am trying to filter out some data with awk. If someone could help me that would be great. Below is my input file. Date: 10-JUN-12 12:00:00 B 0: 00 00 00 00 10 00 16 28 B 120: 00 00 00 39 53 32 86 29 Date: 10-JUN-12 12:00:10 B 0: 00 00 00 00 10 01 11 22 B 120: 00 00 00 29 23 32 16 29... (5 Replies)
Discussion started by: thibodc
5 Replies

8. Shell Programming and Scripting

Variable filtering in awk

Hello all, can you explain why this filter does not work, it prints all the lines in the file: awk -v sel="TestString" 'sel' file while these work: awk '/TestString/' file awk -v sel="TestString" '$0~sel' file Thanks!:) (6 Replies)
Discussion started by: gio001
6 Replies

9. Shell Programming and Scripting

awk print in one line after reading textfile with paragraphs

Hello everybody I have a text file which has the following format: nmm "text20140601.033954text" "text" "text" "text" , ... , "text" "text" , ... , Lat 36.3247 Lon 16.0588 Depth 8 "text", ... , "text" "text", ..., CovXX 1.65 CovYY 2.32 CovZZ 1.2 "text" , ..., "text nmm ... (6 Replies)
Discussion started by: phaethon
6 Replies

10. Shell Programming and Scripting

How to separate sorte different characters from one textfile and copy them in a new textfile?

My first post, so don't kill me :) Say i open some textfile with some example like this. on the table are handy, bread and wine Now i know exactly what is in and i want to separate and sorted it in terminal to an existing file with another 2 existing lines in like this: table plane ... (3 Replies)
Discussion started by: schwatter
3 Replies
Graphics::Primitive::Insets(3pm)			User Contributed Perl Documentation			  Graphics::Primitive::Insets(3pm)

NAME
Graphics::Primitive::Insets - Space between things DESCRIPTION
Graphics::Primitive::Insets represents the amount of space that surrounds something. This object can be used to represent either padding or margins (in the CSS sense, one being inside the bounding box, the other being outside) SYNOPSIS
use Graphics::Primitive::Insets; my $insets = Graphics::Primitive::Insets->new({ top => 5, bottom => 5, left => 5, right => 5 }); METHODS
Constructor new Creates a new Graphics::Primitive::Insets. Instance Methods as_array Return these insets as an array in the form of top, right, bottom and left. bottom Set/Get the inset from the bottom. equal_to Determine if these Insets are equal to another. left Set/Get the inset from the left. right Set/Get the inset from the right. top Set/Get the inset from the top. zero Sets all the insets (top, left, bottom, right) to 0. AUTHOR
Cory Watson, "<gphat@cpan.org>" SEE ALSO
perl(1) COPYRIGHT &; LICENSE Copyright 2008-2010 by Cory G Watson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2010-08-21 Graphics::Primitive::Insets(3pm)
All times are GMT -4. The time now is 10:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy