Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-02-2009, 12:59 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 14

Rep: Reputation: 0
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.
Old 09-02-2009, 01:13 PM   #2
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
For future reference, typing
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 03:14 AM
Automatically append another piped command to issued command in bash amateen Programming 1 05-07-2009 07:36 AM
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 08:19 PM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 07:30 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 03:23 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration