Top Forums Shell Programming and Scripting sed - Find a String and append a text end of the Line Post 302797277 by java2006 on Monday 22nd of April 2013 09:19:01 AM
Old 04-22-2013
sed - Find a String and append a text end of the Line

Hi,
I have a File, which have multiple rows.
Like below

123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY
123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY

I want to search a line which contains PB MO Approver and append the below string at the end of the line.
" PA1"

Result should be like this.

123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY PA1
123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY PA1
123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY PA1
Can any one plese help..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using sed to append text to the end of each line

Anyone know how to use SED to append a comma to the end of each line example: field1,field2,field3,field4 If i Cat /textfile ---- How can i append the end of /textfile with a comman? (8 Replies)
Discussion started by: Redg
8 Replies

2. Shell Programming and Scripting

Append text at end of the first line in a file

Hi I need to append some text @ end of the first line in a file. like myfile.txt list = a,b,c list.a=some.. I give the arg "d" . now it append at end of first line list=a,b,c,d list.a=some... Please help me out this (7 Replies)
Discussion started by: catgovind
7 Replies

3. UNIX for Dummies Questions & Answers

HOWTO Append String to End of Line

I have a comma delimited text file and need to appened ",000000" to the end of every line. For example: Before: "D700000","2006" ,"5000","Open Year" ,"Conversion" ,"Wk64","Productive Payroll $" ,1103.45 After: "D700000","2006" ,"5000","Open Year" ,"Conversion" ,"Wk64","Productive Payroll... (3 Replies)
Discussion started by: bggibson
3 Replies

4. Shell Programming and Scripting

How can I append a string at the end of a line in a file

Hi, guys. I have one question: I have a file called "group", the contents of it is below: ******************************** ... test:x:203: sales:x:204: repair:x:205: research:x:206:brownj ... *********** Now I want to add string ",sherrys" at the end of "research:x:206:brownj", so... (5 Replies)
Discussion started by: daikeyang
5 Replies

5. Shell Programming and Scripting

Append a string at the end of every line in a file

Hi Friends, I have a file with many lines as shown below. /START SAMPLE LINE/ M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\port\Post.java@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\switchview\View.java@@\main\v6.4.0_pit_a /END SAMPLE LINE/ I... (1 Reply)
Discussion started by: nmattam
1 Replies

6. Shell Programming and Scripting

Append the end of each line in a file with a given string

Hi friends, I have a file containing many lines as follows. M:\mmarimut_v6.4.0_pit_01\java\build.xml@@\main\v6.4.0_pit_a M:\mmarimut_v6.4.0_pit_01\ADBasicView.java@@\main\v6.4.0_pit_a I would like to append the string "\0" at the end of each line in the file. The output should look... (10 Replies)
Discussion started by: nmattam
10 Replies

7. Shell Programming and Scripting

Append text to end of line on all lines

Hi, I've spent some time researching for this but can't seem to find a solution. I have a file like this 1234|Test|20101111|18:00|19:00There will be multiple lines in the file with the same kind of format. For every line I need to make it this 1234|Test|20101111|18:00|19:00||create... (5 Replies)
Discussion started by: giles.cardew
5 Replies

8. Shell Programming and Scripting

Append text to end of every line

I've scoured the internet with mixed results. As an amateur I turn to the great minds here. I have a text file of 80 or so lines. I want to add ".pdf" to the end of each line. (For now that's it) Most of the internet points toward using "sed". I don't know coding but can figure things out... (4 Replies)
Discussion started by: spacebase
4 Replies

9. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

10. Shell Programming and Scripting

Append this string to end of each line

Platform: Solaris 10 I have a file like below $ cat languages.txt Spanish Norwegian English Persian German Portugese Chinese Korean Hindi Malayalam Bengali Italian Greek Arabic I want to append the string " is a great language" at end of each line in this file. (3 Replies)
Discussion started by: omega3
3 Replies
DateTime::Locale::az_Cyrl_AZ(3) 			User Contributed Perl Documentation			   DateTime::Locale::az_Cyrl_AZ(3)

NAME
DateTime::Locale::az_Cyrl_AZ SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'az_Cyrl_AZ' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Azerbaijani Cyrillic Azerbaijan. DATA
This locale inherits from the DateTime::Locale::az_Cyrl locale. It contains the following data. Days Wide (format) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Abbreviated (format) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Narrow (format) 1 2 3 4 5 6 7 Wide (stand-alone) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Abbreviated (stand-alone) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Narrow (stand-alone) 1 2 3 4 5 6 7 Months Wide (format) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Abbreviated (format) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) 1-ci kvartal 2-ci kvartal 3-cue kvartal 4-cue kvartal Abbreviated (format) 1-ci kv. 2-ci kv. 3-cue kv. 4-cue kv. Narrow (format) 1 2 3 4 Wide (stand-alone) 1-ci kvartal 2-ci kvartal 3-cue kvartal 4-cue kvartal Abbreviated (stand-alone) 1-ci kv. 2-ci kv. 3-cue kv. 4-cue kv. Narrow (stand-alone) 1 2 3 4 Eras Wide eramXzdan XvvXl bizim eramXzXn Abbreviated e.X. b.e. Narrow e.X. b.e. Date Formats Full 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 5, XXXXXX, 2008 1995-12-22T09:05:02 = XXXX, 22, XXXXXX, 1995 -0010-09-15T04:44:23 = XXXXX, 15, XXXXXXXX, -10 Long 2008-02-05T18:30:30 = 5 XXXXXX , 2008 1995-12-22T09:05:02 = 22 XXXXXX , 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX , -10 Medium 2008-02-05T18:30:30 = 5 XXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 Short 2008-02-05T18:30:30 = 08/02/05 1995-12-22T09:05:02 = 95/12/22 -0010-09-15T04:44:23 = -10/09/15 Default 2008-02-05T18:30:30 = 5 XXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 5, XXXXXX, 2008 18:30:30 UTC 1995-12-22T09:05:02 = XXXX, 22, XXXXXX, 1995 09:05:02 UTC -0010-09-15T04:44:23 = XXXXX, 15, XXXXXXXX, -10 04:44:23 UTC Long 2008-02-05T18:30:30 = 5 XXXXXX , 2008 18:30:30 UTC 1995-12-22T09:05:02 = 22 XXXXXX , 1995 09:05:02 UTC -0010-09-15T04:44:23 = 15 XXXXXXXX , -10 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 XXXXXX, 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXXXX, 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 04:44:23 Short 2008-02-05T18:30:30 = 08/02/05 18:30 1995-12-22T09:05:02 = 95/12/22 09:05 -0010-09-15T04:44:23 = -10/09/15 04:44 Default 2008-02-05T18:30:30 = 5 XXXXXX, 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXXXX, 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 04:44:23 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 XXXXXXXX XXXXXX 1995-12-22T09:05:02 = 22 XXXX -0010-09-15T04:44:23 = 15 XXXXX 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 (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 2-5 1995-12-22T09:05:02 = XXXX, 12-22 -0010-09-15T04:44:23 = XXXXX, 9-15 MMM (LLL) 2008-02-05T18:30:30 = XXXXXX 1995-12-22T09:05:02 = XXXXXX -0010-09-15T04:44:23 = XXXXXXXX MMMd (MMM d) 2008-02-05T18:30:30 = XXXXXX 5 1995-12-22T09:05:02 = XXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX XXXXXX 5 1995-12-22T09:05:02 = XXXX XXXXXX 22 -0010-09-15T04:44:23 = XXXXX XXXXXXXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXXXXX 5 1995-12-22T09:05:02 = XXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXX 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX XXXXXX 5 1995-12-22T09:05:02 = XXXX XXXXXX 22 -0010-09-15T04:44:23 = XXXXX XXXXXXXX 15 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 (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 2008-2-5 1995-12-22T09:05:02 = XXXX, 1995-12-22 -0010-09-15T04:44:23 = XXXXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 2008 XXXXXX 5 1995-12-22T09:05:02 = XXXX, 1995 XXXXXX 22 -0010-09-15T04:44:23 = XXXXX, -10 XXXXXXXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXX 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 1-ci kv. 1995-12-22T09:05:02 = 1995 4-cue kv. -0010-09-15T04:44:23 = -10 3-cue kv. yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week XXXXX 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.12.5 2013-08-25 DateTime::Locale::az_Cyrl_AZ(3)

Featured Tech Videos

All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy