The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
aside from paste kenshinhimura Shell Programming and Scripting 3 03-10-2008 10:16 PM
Bash script pass sentence in block katrvu Shell Programming and Scripting 6 02-11-2008 08:04 AM
how to find capital letter names in a file without finding words at start of sentence kev269 Shell Programming and Scripting 1 04-10-2006 06:35 PM
Extracting certain data from a sentence dbrundrett Shell Programming and Scripting 7 12-17-2003 08:22 AM
grepping for a sentence eloquent99 UNIX for Dummies Questions & Answers 2 04-23-2003 11:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-26-2004
Registered User
 

Join Date: Feb 2004
Posts: 4
paste a sentence

Hi,

I have a big file like this:
BBR 0004186 916 H $$a
BBR 0031086 916 H $$a
BBR 0032551 916 H $$a
BBR 0035481 916 H $$a

I would like to add globally a senetence :

BBR 0004186 916 H $$a new acquisition

How i'll do it?

Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 02-26-2004
Registered User
 

Join Date: Feb 2004
Location: netherlands
Posts: 42
Where and/or which part do you want to add??

I.e. Do you want to add new acquisition to the end of every line.

Please give a bit more information.
__________________

The dead stay dead and the living only wait to join them........
Reply With Quote
  #3  
Old 02-26-2004
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,249
You could use sed....

sed 's/$/new acquisition/' file1 > file2

..or awk...

awk '{print $0 "new acquisition"}' file1 > file2
Reply With Quote
  #4  
Old 02-26-2004
Registered User
 

Join Date: Jan 2004
Location: chennai, india
Posts: 47
you can do it in the vi editor

vi filename
:g/$$a/s//$$a BBR 0004186 916 H $$a/g

this will change all the $$a to $$a BBR 0004186 916 H $$a.

try this and come out

raguram R
__________________
raguram r
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0