The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to change the font or color of text pssandeep UNIX for Dummies Questions & Answers 4 12-18-2007 06:15 PM
Help with find command and list in a long format each found file alexcol Shell Programming and Scripting 5 12-10-2007 08:59 AM
How do I strip and add tabbed fields to a long text file? saint65 Shell Programming and Scripting 3 02-21-2007 02:18 AM
getting error 0403-016 Cannot find or open the file while reading a long line karthee Shell Programming and Scripting 2 06-05-2005 12:00 AM
command find returned bash: /usr/bin/find: Argument list too long yacsil Shell Programming and Scripting 1 12-15-2003 06:38 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-10-2006
aungomarin aungomarin is offline
Registered User
  
 

Join Date: Apr 2006
Location: Thailand
Posts: 15
Find/Change long text

If I have very large text file

***************
***************
***************
***************
***************
ABC-sdfsdf
BBB-xk[ptr';
CCC-sdfolb
ABC-dltg'fl;l

My aim:
-> tail last 10 lines from large text. ***** Ok *****
-> Change first 3 charactors which begin with "ABC" to "abc". ***** ??? ****
Thk very much
  #2 (permalink)  
Old 07-10-2006
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,418
Try this
Code:
tail -10 input_file | sed 's/^ABC/abc/' > output_file
Jean-Pierre.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0