LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command help (https://www.linuxquestions.org/questions/linux-newbie-8/command-help-752143/)

caponewgp 09-02-2009 11:59 AM

Command help
 
Im having a hard time figuring out exactly what this command does.
cut -f 5 -d: /etc/passwd | grep '^J' | wc –l
I know that cut -f 5 will copy only the first and fifth fields but I cant figure out about the -d: /etc/passwd| grep '^J' will do.
Any general help will be appreciated Im just having a hard time finding anything about the -d argument on the internet.

indienick 09-02-2009 12:13 PM

For future reference, typing
Code:

man command
will bring up a manual page describing the ins-and-outs of almost any program installed on your system.

The "-d" option sets the delimiter - the place at which to separate the elements in the file (/etc/passwd) by - in this case, it is the colon ":" character.

The output is then passed to the "grep" command where it is searching for the pattern dictated by "^J" - I don't know what this pattern dictates. That's for you to find out. ;)

And the "wc -l" command means to count the number of lines that the "grep" command prints.


All times are GMT -5. The time now is 09:27 AM.