The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 cut and grep
Author: Todor Zahariev 
Date:   28-10-01 18:40

(written by Todor Zahariev, posted by Dan Langille)

I have suggestion for printing user:

cat /etc/passwd | cut -d: -f1 | grep -v \#

change to:

grep -v \# /etc/passwd | cut -d: -f1

reasons:
1. save 1 pipe and 1 cat execution.
2. move thru the pipe less data (removed lines with #)

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 cut and grep   new
Todor Zahariev 28-10-01 18:40 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org