[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] useradd script?



Chris Hobbs wrote:

:%s/,/:/g

Assuming that there are probably folks out there that don't use vim regularly, here's a breakdown of what the above command does:


+---------- Enter Command Mode
|+--------- Perform command from this line to End Of File
||+-------- Enter Substitution mode
||| +------ What to replace (,) - this is a regex
||| | +---- What to replace with (:)
||| | | +-- Do for all instances in line (no 'g' means
||| | | |   only do for first match on line)
||| | | |
:%s/,/:/g

Hope this helps!

--
Chris Hobbs       Silver Valley Unified School District
Head geek:              Technology Services Coordinator
webmaster:   http://www.silvervalley.k12.ca.us/~chobbs/
postmaster:               chobbs silvervalley k12 ca us
pgp:  http://www.silvervalley.k12.ca.us/~chobbs/key.asc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]