select only user who use /bin/bash shell from the /etc/passwd folder
Hi,
How can I select only user who use /bin/bash shell from the /etc/passwd folder and copy them in another file? |
You can try sed or awk:
Code:
$ sed -n '\:/bin/bash$:p' /etc/passwd |
awasome..works perfect...tanks a lot..
|
What's wrong with a simple grep?
Code:
grep '/bin/bash' /etc/passwd |
All times are GMT -5. The time now is 10:40 AM. |