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
Substitute for echo hanyou.lin Linux 1 09-16-2008 07:05 AM
rm substitute with blacklist broli UNIX for Dummies Questions & Answers 2 12-06-2007 08:13 AM
Substitute Variable mmg2711 UNIX for Dummies Questions & Answers 0 10-26-2007 07:59 AM
Substitute in vi kingdbag UNIX for Dummies Questions & Answers 5 01-17-2007 02:42 PM
vi + regexp + substitute Lomic UNIX for Dummies Questions & Answers 9 12-10-2004 10:50 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-30-2008
besgal besgal is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 2
Trouble with search and substitute

Hi there,
I have a file with 1800+ lines and all are something like this:

drwx--x--x 12960 4096 Oct 6 2006 palfvoet
drwx--x--x 67205 4096 May 9 05:21 pallsopp
drwx--x--x palmgren 4096 Oct 6 2006 palmgren

now, as you can see, the middle one shows a time instead of a year, and every line in the file that has this needs to be marked with a * at the end of the line

I tried something like this:
/\:/,$s/.$/&*/g
but he just changed every line after the first one with a :

Anyone knows what I'm doing wrong?

PS: I'm using vi to edit this file
 

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 06:23 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