Trying to Sort Two Files
I have two files (passwd.txt, group.txt) that I would like to take information out of and put into a new file. I would like to list all the users having a shell “/bin/bash” followed by a space separated list of all the groups each user belongs to. I'm brand new to Linux and just trying to organize some things and learn along the way. I would also like to have the new file in alphabetical order, if that is possible.
I don't think this is that complicated of a task, but since I'm a newb I could use the help. Thanks in advance! |
Hello rjdelight, welcome to LQ,
this looks like homework to me. We're not here to do your homework. Could you please provide some information about what you've tried by yourself to solve your problem? Markus |
Quote:
Read up on "-F" in the context of awk, and on bash's while & read. Cheers, Tink |
You may find these useful
http://rute.2038bug.com/index.html.gz http://tldp.org/LDP/Bash-Beginners-G...tml/index.html |
Come on Tink ... single awk is all you need ... lol
|
Quote:
|
All times are GMT -5. The time now is 06:44 PM. |