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
cygwin bash startup command weirdness (part 1) fabulous2 UNIX for Dummies Questions & Answers 1 05-19-2008 03:25 AM
cygwin - sh-3.2$ help! bobby999 UNIX for Dummies Questions & Answers 1 04-22-2008 01:23 PM
How to use route command on SuSE & Cygwin siegfried UNIX for Dummies Questions & Answers 3 04-13-2006 02:51 AM
Cygwin sam71 UNIX for Dummies Questions & Answers 1 05-06-2005 02:35 PM
about cygwin wins1982 UNIX for Dummies Questions & Answers 4 04-29-2004 12:15 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-27-2005
gauri_agr gauri_agr is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 14
Sed command in cygwin

I am new to unix and lerning tru cygwin (unix simulation on windows)

i am trying to lern sed command and want to interchange first and second no in a string. What i mean is

i want gauri 1234 556 to gauri 556 1234

i am getting the following error


$ echo gauri 1234 556 | sed s/\([0-9]*\) \([0-9]*\)/\2 \1/
sed: -e expression #1, char 10: unterminated `s' command
  #2 (permalink)  
Old 07-27-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
echo gauri 1234 556 | sed 's/\([0-9][0-9]*\) \([0-9][0-9]*\)/\2 \1/'

Enclose the expression within single quotes.

vino
  #3 (permalink)  
Old 07-27-2005
gauri_agr gauri_agr is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 14
thanks a lot. Actually i was doing this mistake with all sed command..
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 04:19 PM.


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