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 > 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
awk program to select a portion of a line anju Shell Programming and Scripting 3 01-11-2008 06:33 AM
Backspace erasing the prompt videsh77 UNIX for Dummies Questions & Answers 4 01-23-2007 07:38 AM
Delete Portion of a file sameersbn High Level Programming 2 01-20-2007 12:16 AM
erasing portion of line with sed gammaman UNIX for Dummies Questions & Answers 5 07-10-2005 10:47 PM
erasing old files lsquillacioti UNIX for Dummies Questions & Answers 1 04-10-2001 02:45 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-14-2005
gammaman gammaman is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 19
erasing portion of line with sed (only once)

hi,

I'm trying to use sed to erase everything, up to the first parenthesis. for example:
input: blah blah blah (aldj) test (dafs) test test.
output: (aldj) test (dafs) test test.

how would i do this?
I was fooling around with the parenthesis, and i only got it to apply on all parenthesis. What would I need to do to make it work on the first parenthesis. Here's what I had:
sed "s|.*(||" filename > output

thanks,
gammaman
  #2 (permalink)  
Old 07-14-2005
r2007's Avatar
r2007 r2007 is offline
Registered User
  
 

Join Date: Jun 2005
Location: China
Posts: 73
sed 's/[^(]*//'
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 09:01 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