Sponsored Content
Full Discussion: SED/AWK command
Top Forums Shell Programming and Scripting SED/AWK command Post 302476302 by bhaskar_m on Wednesday 1st of December 2010 11:27:02 AM
Old 12-01-2010
Quote:
Originally Posted by cabrao
Maybe this?
Code:
awk '/Deploy/{print $2,$3,$4;getline;print $2}' file

Hi,

The file may appear also as. This is a log of one application.

Code:
- XXXXXXX [2] <server-address>
- YYYYYY [4] <server-address>
- ZZZZZZZ[2] <server-address>
- AAAAA [4] <server-address>
- BBBBBBB [2] <server-address>
- ZZZZZ [4] <server-address>

I need to filter this file to an another output file which will contain like this

Code:
- XXXXXXX 
- YYYYYY 
- ZZZZZZZ
- AAAAA 
- BBBBBBB 
- ZZZZZ

That is I am just filtering out the strings from the log lines.

HTH

Regards,
Bhaskar

Last edited by bhaskar_m; 12-01-2010 at 12:27 PM.. Reason: added coding
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

What do you know about the Sed and Awk command??

I just need some information on what they can be use for and whatever else there is. anything you know, state here (2 Replies)
Discussion started by: TRUEST
2 Replies

2. Shell Programming and Scripting

Help with Sed or AWK command!!!

Hi, I need help with Sed or AWk command.i want to remove all the numerals from the file name.These files are stored within a text file and after the numerals are removed,i need to redirect its output to another new .txt file. Input: aa_1002985_952.xml aa_bb_032207.txt... (5 Replies)
Discussion started by: kumarsaravana_s
5 Replies

3. Shell Programming and Scripting

sed for this awk command

Hi what would be the sed equivalent of this awk command: awk '/$getsn/{getline;next}{print}' file It deletes the variable found and the next line after it in a file. Thanks (3 Replies)
Discussion started by: wisher115
3 Replies

4. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

5. Shell Programming and Scripting

Interpret sed and awk in the below command.

Could you interpret the following sed and awk command for me? command: cat tempfile2 |sed "s/\(BUILD-3-.*-\.-\)\(.*\..*\..*\)/\2/" | awk '{printf "%-8.8s %-23.23s %-30.30s %-50.50s\n", $1,$2,$3,substr($0,index($0,$4))}' > outfile2 2>/dev/null input:data in tempfile2... (5 Replies)
Discussion started by: vj8436
5 Replies

6. Shell Programming and Scripting

Command line - awk, sed

My input file gfile values is CTRY=GM&PROJTYPE=SP&PROJECTTYPE=Small+Project If i am giving PROJECTTYPE then it must give Small Project awk -F"&" '{for (i=1; i<=NF; i++) if ($i ~ "^"PAT) {sub ("^"PAT"=", "", $i); sed 's/'+'/""/' $i ; print $i }}' PAT=$1 ... (6 Replies)
Discussion started by: nag_sathi
6 Replies

7. Shell Programming and Scripting

sed and awk giving error ./sample.sh: line 13: sed: command not found

Hi, I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :- ./sample.sh: line... (12 Replies)
Discussion started by: satishmallidi
12 Replies

8. Shell Programming and Scripting

Need help with sed/awk command

Dear ALL, I am still struggling with some basic sed operations. I want to change path in a file as shown below: case_OM = PV4Reader( FileName='/home/linuxUser/demoCases/s1/case/case.OM' ) to case_OM = PV4Reader( FileName='/home/linuxUser/demoCases/s2/case/case.OM' ) In this file there... (5 Replies)
Discussion started by: linuxUser_
5 Replies

9. Shell Programming and Scripting

Need help with sed/awk command

Dear all, I have a file named as fileName with following entities, functions { planeDictName { type surfaces; functionObjectLibs ( "libsampling.so" ); outputControl timeStep; surfaceFormat vtk; fields ( p U ); ... (42 Replies)
Discussion started by: linuxUser_
42 Replies

10. Shell Programming and Scripting

Help with sed/awk command

Hi All, This is my first thread. Hopefully you guys can help me out. I have a csv file, that provides access to managers to a tool. The file is loaded onto our server containing all the assc id's with a trailing comma. For ex: 182950, 123456, However, we receive a file that... (8 Replies)
Discussion started by: Prateek Dubey
8 Replies
DateTime::Locale::hi_IN(3)				User Contributed Perl Documentation				DateTime::Locale::hi_IN(3)

NAME
DateTime::Locale::hi_IN SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'hi_IN' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Hindi India. DATA
This locale inherits from the DateTime::Locale::hi locale. It contains the following data. Days Wide (format) XXXXXX XXXXXXX XXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (format) XXX XXXX XXX XXXX XXXXX XXX XXX Narrow (format) XX XX XX XX XX X X Wide (stand-alone) XXXXXX XXXXXXX XXXXXX XXXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XXX XXXX XXX XXXX XXXXX XXX XXX Narrow (stand-alone) XX XX XX XX XX X X Months Wide (format) XXXXX XXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXX XXXXXXX XXXXXX XXXXXXX Abbreviated (format) XXXXX XXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXX XXXXXXX XXXXXX XXXXXXX Narrow (format) X XX XX X X XX XX X XX X X XX Wide (stand-alone) XXXXX XXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXX XXXXXXX XXXXXX XXXXXXX Abbreviated (stand-alone) XXXXX XXXXX XXXXX XXXXXX XX XXX XXXXX XXXXX XXXXXXX XXXXXXX XXXXXX XXXXXXX Narrow (stand-alone) X XX XX X X XX XX X XX X X XX Quarters Wide (format) XXXXX XXXXX XXXXXXX XXXXX XXXXX XXXXX XXXXXX XXXXX Abbreviated (format) XXXXX XXXXX XXXXXXX XXXXX XXXXX XXXXX XXXXXX XXXXX Narrow (format) 1 2 3 4 Wide (stand-alone) XXXXX XXXXX XXXXXXX XXXXX XXXXX XXXXX XXXXXX XXXXX Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated XXXXXXXX XX Narrow XXXXXXXX XX Date Formats Full 2008-02-05T18:30:30 = XXXXXXX, 5 XXXXX 2008 1995-12-22T09:05:02 = XXXXXXXX, 22 XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX, 15 XXXXXXX -10 Long 2008-02-05T18:30:30 = 5 XXXXX 2008 1995-12-22T09:05:02 = 22 XXXXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXXXX -10 Medium 2008-02-05T18:30:30 = 05-02-2008 1995-12-22T09:05:02 = 22-12-1995 -0010-09-15T04:44:23 = 15-09--010 Short 2008-02-05T18:30:30 = 5-2-08 1995-12-22T09:05:02 = 22-12-95 -0010-09-15T04:44:23 = 15-9--10 Default 2008-02-05T18:30:30 = 05-02-2008 1995-12-22T09:05:02 = 22-12-1995 -0010-09-15T04:44:23 = 15-09--010 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 PM UTC 1995-12-22T09:05:02 = 9:05:02 AM UTC -0010-09-15T04:44:23 = 4:44:23 AM UTC Long 2008-02-05T18:30:30 = 6:30:30 PM UTC 1995-12-22T09:05:02 = 9:05:02 AM UTC -0010-09-15T04:44:23 = 4:44:23 AM UTC Medium 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM Short 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Default 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXX, 5 XXXXX 2008 6:30:30 PM UTC 1995-12-22T09:05:02 = XXXXXXXX, 22 XXXXXXX 1995 9:05:02 AM UTC -0010-09-15T04:44:23 = XXXXXX, 15 XXXXXXX -10 4:44:23 AM UTC Long 2008-02-05T18:30:30 = 5 XXXXX 2008 6:30:30 PM UTC 1995-12-22T09:05:02 = 22 XXXXXXX 1995 9:05:02 AM UTC -0010-09-15T04:44:23 = 15 XXXXXXX -10 4:44:23 AM UTC Medium 2008-02-05T18:30:30 = 05-02-2008 6:30:30 PM 1995-12-22T09:05:02 = 22-12-1995 9:05:02 AM -0010-09-15T04:44:23 = 15-09--010 4:44:23 AM Short 2008-02-05T18:30:30 = 5-2-08 6:30 PM 1995-12-22T09:05:02 = 22-12-95 9:05 AM -0010-09-15T04:44:23 = 15-9--10 4:44 AM Default 2008-02-05T18:30:30 = 05-02-2008 6:30:30 PM 1995-12-22T09:05:02 = 22-12-1995 9:05:02 AM -0010-09-15T04:44:23 = 15-09--010 4:44:23 AM Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XXXX 1995-12-22T09:05:02 = 22 XXXXX -0010-09-15T04:44:23 = 15 XXX GGGGyMMMMEEEEdd (EEEE,dd MMMM GGGGy) 2008-02-05T18:30:30 = XXXXXXX,05 XXXXX CE2008 1995-12-22T09:05:02 = XXXXXXXX,22 XXXXXXX CE1995 -0010-09-15T04:44:23 = XXXXXX,15 XXXXXXX BCE-10 HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 hhmm (hh:mm a) 2008-02-05T18:30:30 = 06:30 PM 1995-12-22T09:05:02 = 09:05 AM -0010-09-15T04:44:23 = 04:44 AM HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 hhmmss (hh:mm:ss a) 2008-02-05T18:30:30 = 06:30:30 PM 1995-12-22T09:05:02 = 09:05:02 AM -0010-09-15T04:44:23 = 04:44:23 AM Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/M) 2008-02-05T18:30:30 = 5/2 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/9 MEd (E, d/M) 2008-02-05T18:30:30 = XXXX, 5/2 1995-12-22T09:05:02 = XXXXX, 22/12 -0010-09-15T04:44:23 = XXX, 15/9 MMdd (dd-MM) 2008-02-05T18:30:30 = 05-02 1995-12-22T09:05:02 = 22-12 -0010-09-15T04:44:23 = 15-09 MMM (LLL) 2008-02-05T18:30:30 = XXXXX 1995-12-22T09:05:02 = XXXXXXX -0010-09-15T04:44:23 = XXXXXXX MMMd (d MMM) 2008-02-05T18:30:30 = 5 XXXXX 1995-12-22T09:05:02 = 22 XXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXX MMMdd (dd MMM) 2008-02-05T18:30:30 = 05 XXXXX 1995-12-22T09:05:02 = 22 XXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXX MMMEd (E, d MMM) 2008-02-05T18:30:30 = XXXX, 5 XXXXX 1995-12-22T09:05:02 = XXXXX, 22 XXXXXXX -0010-09-15T04:44:23 = XXX, 15 XXXXXXX MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXX 1995-12-22T09:05:02 = 22 XXXXXXX -0010-09-15T04:44:23 = 15 XXXXXXX MMMMEd (E, d MMMM) 2008-02-05T18:30:30 = XXXX, 5 XXXXX 1995-12-22T09:05:02 = XXXXX, 22 XXXXXXX -0010-09-15T04:44:23 = XXX, 15 XXXXXXX ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (M-y) 2008-02-05T18:30:30 = 2-2008 1995-12-22T09:05:02 = 12-1995 -0010-09-15T04:44:23 = 9--10 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = XXXX, 2008-2-5 1995-12-22T09:05:02 = XXXXX, 1995-12-22 -0010-09-15T04:44:23 = XXX, -10-9-15 yMMM (MMM y) 2008-02-05T18:30:30 = XXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXX -10 yMMMEd (EEE, d MMM y) 2008-02-05T18:30:30 = XXXX, 5 XXXXX 2008 1995-12-22T09:05:02 = XXXXX, 22 XXXXXXX 1995 -0010-09-15T04:44:23 = XXX, 15 XXXXXXX -10 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXX 1995-12-22T09:05:02 = 1995 XXXXXXX -0010-09-15T04:44:23 = -10 XXXXXXX yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 XXXXX XXXXX 1995-12-22T09:05:02 = 1995 XXXXXX XXXXX -0010-09-15T04:44:23 = -10 XXXXX XXXXX yyMMdd (dd-MM-yy) 2008-02-05T18:30:30 = 05-02-08 1995-12-22T09:05:02 = 22-12-95 -0010-09-15T04:44:23 = 15-09--10 yyMMMd (d MMM, yy) 2008-02-05T18:30:30 = 5 XXXXX, 08 1995-12-22T09:05:02 = 22 XXXXXXX, 95 -0010-09-15T04:44:23 = 15 XXXXXXX, -10 yyMMMEEEd (EEE, d MMM yy) 2008-02-05T18:30:30 = XXXX, 5 XXXXX 08 1995-12-22T09:05:02 = XXXXX, 22 XXXXXXX 95 -0010-09-15T04:44:23 = XXX, 15 XXXXXXX -10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMM (MM-yyyy) 2008-02-05T18:30:30 = 02-2008 1995-12-22T09:05:02 = 12-1995 -0010-09-15T04:44:23 = 09--010 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXX -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::hi_IN(3)
All times are GMT -4. The time now is 01:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy