Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Linux User Groups (LUG)
User Name
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.


Closed Thread
  Search this Thread
Old 08-05-2007, 11:23 PM   #1
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"


"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
Old 08-06-2007, 12:49 AM   #2
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
This thread is a duplicate of the following one:
Old 08-06-2007, 01:31 PM   #3
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Non-*NIX Forums > Linux User Groups (LUG)

All times are GMT -5. The time now is 02:33 AM.

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