LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Linux User Groups (LUG)
User Name
Password
Linux User Groups (LUG) This forum allows Linux User Groups (LUG) to gain exposure. It also allows people looking for a LUG in their area to find one.

Notices


Closed Thread
  Search this Thread
Old 08-05-2007, 11:23 PM   #1
chris_looks
LQ Newbie
 
Registered: Aug 2007
Posts: 5

Rep: Reputation: 0
Unhappy I am learning sed / grep working and am stuck with a problem


Hi, I recently started learning sed/grep commands; that are required for me to work better..

Now my problemmme is this:-

I have 2 files that have contents in these two formats:-
"From x.rar/Vee/six.jpg" "SM/ded/.." "SMW"
..

and

"From x.rar/Vee/six.jpg" "SM/ded/.."

I want my sed command to delete anything afterthe 1st space i.e.
desired o/p for both the cases is
"From x.rar/Vee/six.jpg"

Can anyone tell me how to do this??

I am a beginner so any help on this would be much appreciated!

Thanks all
Veena
 
Old 08-06-2007, 12:49 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
This thread is a duplicate of the following one:

http://www.linuxquestions.org/questi...d.php?t=574988
 
Old 08-06-2007, 01:31 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I need some help with SED and/or GREP... TheEngineer Linux - Newbie 1 02-02-2007 08:17 PM
bash script with grep and sed: sed getting filenames from grep odysseus.lost Programming 1 07-17-2006 11:36 AM
How can I awk/sed/grep the IPs from the maillog? abefroman Programming 7 03-09-2006 10:22 AM
Simple Text Reformat (sed and grep) mikefazz Programming 2 08-31-2004 07:38 PM
sed & grep script? dolvmin Linux - Software 20 09-22-2003 06:30 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Linux User Groups (LUG)

All times are GMT -5. The time now is 01:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration