1st, thanks in advance.
heres the problem.
I have a passwd file that i want to change 2 things in it. The home directory location and the word dummy to the actual user's name.
heres an example of whats in the passwd file:
username:x:510:50000:customername:/home/DIR/dummy:/bin/nologin
basically i want to take the 1st letter only of the username, in this case the user is "username", so i want to take the letter u and replace "DIR" with u and to also replace the word "dummy" with the actual username. in this case "username"
im sure theres a way in sed or awk to do this, unfortuantly im not that good with either of them.
thanks again.
heres the problem.
I have a passwd file that i want to change 2 things in it. The home directory location and the word dummy to the actual user's name.
heres an example of whats in the passwd file:
username:x:510:50000:customername:/home/DIR/dummy:/bin/nologin
basically i want to take the 1st letter only of the username, in this case the user is "username", so i want to take the letter u and replace "DIR" with u and to also replace the word "dummy" with the actual username. in this case "username"
im sure theres a way in sed or awk to do this, unfortuantly im not that good with either of them.
thanks again.