Sponsored Content
Full Discussion: Grep userids
Top Forums Shell Programming and Scripting Grep userids Post 302256289 by wempy on Sunday 9th of November 2008 07:32:48 AM
Old 11-09-2008
Code:
cut -d: -f1 /etc/passwd |grep -v "\."

will give you the names without a "." in them (remove the -v to give only the names with a "." in them.
Code:
for name in $(cut -d: -f1 /etc/passwd)
do
[ ${#name} -gt 10 ] && echo $name
done

will give you the names that are greater than 10 chars long

Last edited by wempy; 11-09-2008 at 08:34 AM.. Reason: for conciseness
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Will userids make a difference in performance?

I have nearly 10 users who login into the HP server (D series, HP UX 10.20) with the same UNIX user name, "liveuser", and they start the UNIX based transactions. If I create separate UNIX user-ids for all the 10, will the system performance improve? (1 Reply)
Discussion started by: augustinep
1 Replies

2. Shell Programming and Scripting

MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else

Hi Guys, I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys. MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' ` Harby. (4 Replies)
Discussion started by: hariza
4 Replies

3. Shell Programming and Scripting

how to grep sort userids

hello folks i have a file that have data like /test/aa/123 /test/aa/xyz /test/bb/xyz /test/bb/123 in above lines i just wants to grep "aa" and "bb". Thanks, Bash (4 Replies)
Discussion started by: learnbash
4 Replies

4. UNIX for Dummies Questions & Answers

| help | unix | grep (GNU grep) 2.5.1 | advanced regex syntax

Hello, I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide. ls -aLl /bin | grep "\(x\)" Which works, just highlights 'x' where ever, when ever. I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies

5. Shell Programming and Scripting

grep for certain files using a file as input to grep and then move

Hi All, I need to grep few files which has words like the below in the file name , which i want to put it in a file and and grep for the files which contain these names and move it to a new directory , full file name -C20091210.1000-20091210.1100_SMGBSC3:1000... (2 Replies)
Discussion started by: anita07
2 Replies

6. Shell Programming and Scripting

Script to capture userids logged on & killing as well

Can someone help me with a script to capture the list of users logged on at a point of time, and if a particular user id say xyz exists, kill that process Id. (2 Replies)
Discussion started by: ggayathri
2 Replies

7. Shell Programming and Scripting

AWK/GREP: grep only lines starting with integer

I have an input file 12.4 1.72849432773174e+01 -7.74784188610632e+01 12.5 9.59432114416327e-01 -7.87018212757537e+01 15.6 5.20139995965960e-01 -5.61612429666624e+01 29.3 3.76696387248366e+00 -7.42896194101892e+01 32.1 1.86899877018077e+01 -7.56508762501408e+01 35 6.98857157014640e+00... (2 Replies)
Discussion started by: chrisjorg
2 Replies

8. UNIX for Dummies Questions & Answers

Bash - CLI - grep - Passing result to grep through pipe

Hello. I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv" lsmod | (e)grep '^nv???????????? I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long ... (1 Reply)
Discussion started by: jcdole
1 Replies

9. UNIX for Dummies Questions & Answers

Piping grep into awk, read the next line using grep

Hi, I have a number of files containing the information below. """"" Fundallinfo 6.3950 14.9715 14.0482 """"" I would like to grep for Fundallinfo and use it to read the next line? I ideally would like to read the three numbers that follow in the next line and... (2 Replies)
Discussion started by: Paul Moghadam
2 Replies

10. Shell Programming and Scripting

Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`

i have this line of code that looks for the same file if it is currently running and returns the count. `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l` basically it is assigned to a variable ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
DELIVER(8)						      System Manager's Manual							DELIVER(8)

 *

NAME
deliver - deliver mail to an IMAP mailbox SYNOPSIS
deliver [ -C config-file ] [ -d ] [ -r address ] [ -f address ] [ -m mailbox ] [ -a auth-id ] [ -q ] [ userid ]... deliver [ -C config-file ] -l DESCRIPTION
Deliver reads a message from the standard input and delivers it to one or more IMAP mailboxes. Deliver reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C. OPTIONS
-C config-file Read configuration options from config-file. -d Ignored for compatability with /bin/mail. -r address Insert a Return-Path: header containing address -f address Insert a Return-Path: header containing address -m mailbox Deliver to mailbox. If any userids are specified, attempts to deliver to user.userid.mailbox for each userid. If the ACL on any such mailbox does not grant the sender the "p" right or if -m is not specified, then delivers to the INBOX for the userid, regard- less of the ACL on the INBOX. If no userids are specified, attempts to deliver to mailbox. If the ACL on mailbox does not grant the sender the "p" right, the delivery fails. -a auth-id Specify the authorization id of the sender. Defaults to "anonymous". -q Deliver message even when receiving mailbox is over quota. -l Accept messages using the LMTP protocol. NOTES
Depending on the setting of reject8bit in imapd.conf(5), deliver either rejects/accepts messages with 8-bit-set characters in the headers. If we accept messages with 8-bit-set characters in the headers, then depending on the setting of munge8bit, these characters are either left un-touched or changed to `X'. This is because such characters can't be interpreted since the character set is not known, although some communities not well-served by US-ASCII assume that those characters can be used to represent characters not present in US-ASCII. A method for encoding 8-bit-set characters is provided by RFC 2047. FILES
/etc/imapd.conf SEE ALSO
lmtpd(8) CMU
Project Cyrus DELIVER(8)
All times are GMT -4. The time now is 07:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy