This is a discussion on Edit home directories in /etc/passwd file - awk ; Hi, I want to edit /etc/passwd file using sed/awk to achieve the following: Whoever has a home directory as /home/<user name>, it should be replaced by /newhome/<user name>. Obviously, if there are any other strings which include string "home" in ...
Hi,
I want to edit /etc/passwd file using sed/awk to achieve the following:
Whoever has a home directory as /home/<user name>, it should be replaced by /newhome/<user name>. Obviously, if there are any other strings which include string "home" in them, they should be left untouched. Any pointers on how to do this?
Thanks,
Kamlesh