Sponsored Content
Top Forums Shell Programming and Scripting Organizing text file by Capital Names (capital word ' ' capital word) Post 302936425 by RudiC on Wednesday 25th of February 2015 11:08:18 AM
Old 02-25-2015
If "garbage" is root and other system accounts, and you are interested only in "normal" users, you might want to check for the uid ($3) to be >= 1000. The UID_MIN value if found in e.g. /etc/login.defs on linux system.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Transformation capital letter

:confused: Hye everybody i would like to know if exist a internet site where i can founs some interesting shell script very usefull I need to transform hundreds names of files escribed in CAPITAL letter in minuscule letter do oyu know a mean o do that that thanks to a script or a shell... (1 Reply)
Discussion started by: Dark Angel
1 Replies

2. UNIX for Dummies Questions & Answers

capital letters GONE!

I have an odd issue. I am trying to copy some files/folders to my linux box via a burned CD which I created on my mac. When I browse the files on the mac (or my windows box), everything looks fine (some of the folder names start with a capital letter, which is needed for everything to work... (8 Replies)
Discussion started by: blogg
8 Replies

3. Shell Programming and Scripting

capital sed

Hi everyone. I wanted to convert capital characters to small one. So i tried to use: sed -e "y///" but this won't work. And sed -e "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" this worked well. Does anyone know why?? (2 Replies)
Discussion started by: Euler04
2 Replies

4. Shell Programming and Scripting

Change a parameter to be in capital letters

Hi, I have a korn shell script with 1 parameter. My script deletes certain files, for example.... sid=$1 rm $ORC/dbs/orapwd${sid} #orapwddb1 rm $ORC/dbs/lk${sid} #lkDB1 In the first file, the $sid must be in small letters and in the second file, the $sid must be in capital... (4 Replies)
Discussion started by: n8575
4 Replies

5. Shell Programming and Scripting

how to find capital letter names in a file without finding words at start of sentence

Hi, I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this? Thanks for your help. (1 Reply)
Discussion started by: kev269
1 Replies

6. UNIX for Dummies Questions & Answers

How to search for capital letters

Hi, I just want to search a file for any words containng a capital letter and then display a list of just these words! I have been trying grep but to no has not helped.(im using the bash shell) (1 Reply)
Discussion started by: djdaniel3
1 Replies

7. Shell Programming and Scripting

converting day to capital letter...

Hello, I am receiving a file every day as this format. Since today is friday, the format is, PGI_STG_FRIDAY14.TXT. I need to write the shell script to check if this file exist in folder... I am using date format.. export DATE=`date '+%A'` echo $DATE The output is Friday But i... (8 Replies)
Discussion started by: govindts
8 Replies

8. Shell Programming and Scripting

changing all characters of a file to capital letters

Hi guys. I have file named output.txt containing file names. one per line. I use this command to convert all characters to capital letters and write to the same file. cat output.txt | tr 'a-z' 'A-Z' > output.txtBut at the end output.txt is emtpy. Could anyone help?? (6 Replies)
Discussion started by: majid.merkava
6 Replies
LSLOGINS(1)							   User Commands						       LSLOGINS(1)

NAME
lslogins - display information about known users in the system SYNOPSIS
lslogins [options] [-s|-u[=UID]] [-g groups] [-l logins] DESCRIPTION
Examine the wtmp and btmp logs, /etc/shadow (if necessary) and /etc/passwd and output the desired data. The default action is to list info about all the users in the system. OPTIONS
Mandatory arguments to long options are mandatory for short options too. -a, --acc-expiration Display data about the date of last password change and the account expiration date (see shadow(5) for more info). (Requires root privileges.) --btmp-file path Alternate path for btmp. -c, --colon-separate Separate info about each user with a colon instead of a newline. -e, --export Output data in the format of NAME=VALUE. -f, --failed Display data about the users' last failed login attempts. -G, --supp-groups Show information about supplementary groups. -g, --groups=groups Only show data of users belonging to groups. More than one group may be specified; the list has to be comma-separated. Note that relation between user and group may be invisible for primary group if the user is not explicitly specify as group member (e.g. in /etc/group). If the command lslogins scans for groups than it uses groups database only, and user database with primary GID is not used at all. -h, --help Display help information and exit. -L, --last Display data containing information about the users' last login sessions. -l, --logins=logins Only show data of users with a login specified in logins (user names or user IDS). More than one login may be specified; the list has to be comma-separated. -n, --newline Display each piece of information on a separate line. --noheadings Do not print a header line. --notruncate Don't truncate output. -o, --output list Specify which output columns to print. Use --help to get a list of all supported columns. -p, --pwd Display information related to login by password (see also -afL). -r, --raw Raw output (no columnation). -s, --system-accs Show system accounts. These are by default all accounts with a UID below 1000 (non-inclusive), with the exception of either nobody or nfsnobody (UID 65534). This hardcoded default maybe overwritten by parameters SYS_UID_MIN and SYS_UID_MAX in the file /etc/login.defs. --time-format type Display dates in short, full or iso format. The default is short, this time format is designed to be space efficient and human readable. -u, --user-accs Show user accounts. These are by default all accounts with UID above 1000 (inclusive), with the exception of either nobody or nfs- nobody (UID 65534). This hardcoded default maybe overwritten by parameters UID_MIN and UID_MAX in the file /etc/login.defs. -V, --version Display version information and exit. --wtmp-file path Alternate path for wtmp. -Z, --context Display the users' security context. -z, --print0 Delimit user entries with a nul character, instead of a newline. NOTES
The default UID thresholds are read from /etc/login.defs. EXIT STATUS
0 if OK, 1 if incorrect arguments specified, 2 if a serious error occurs (e.g. a corrupt log). SEE ALSO
group(5), passwd(5), shadow(5), utmp(5) HISTORY
The lslogins utility is inspired by the logins utility, which first appeared in FreeBSD 4.10. AUTHORS
Ondrej Oprala <ooprala@redhat.com> Karel Zak <kzak@redhat.com> AVAILABILITY
The lslogins command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux April 2014 LSLOGINS(1)
All times are GMT -4. The time now is 03:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy