bug-bash
[Top][All Lists]
Advanced

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

scripting help


From: suser
Subject: scripting help
Date: Tue, 25 Sep 2007 13:08:00 -0700 (PDT)

I am trying to create a script to go through /etc/passwd and change anyone
who's home directory is "/mnt/home" to "/mnt/<username on linux server>". I
have been playing around with loops and regular expressions but have not got
anything close to the results i want. I have roughly 1000 users so changing
them all by hand is quite the pain.

so basically im trying to do something like the following:

Original - user:x:1000:100:user:/mnt/home:/bin/bash

what i want - user:x:1000:100:user:/mnt/user:/bin/bash

any suggestions? thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/scripting-help-tf4517825.html#a12887532
Sent from the Gnu - Bash mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]