Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extract user accounts and home directory from /etc/passwd. Post 302905200 by RudiC on Tuesday 10th of June 2014 08:37:26 AM
Old 06-10-2014
I'm afraid that [0-9]*[0-9] will match any integer number, even longer than two digits. Try [0-9]?[0-9] instead. You may need to escape the quotation mark or use extended grep.
This User Gave Thanks to RudiC For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

resrtrict user to his home directory

Hello How do i restrict a user only to his own directory so that he wont be able to cd to other directories. say for excample there is user called xiamin then xiamin should be restricted to /usr/xiamin only. i am on redhat linux regards Hrishy (4 Replies)
Discussion started by: xiamin
4 Replies

2. UNIX for Dummies Questions & Answers

user home directory problem

The home directory for me on my system is on /home/kwon. It was created using "useradd kwon" When i go to change the home directory for a user doing a usermod -d /home/test when they log on it gives them messages saying to generate new ssh keys, and it does. It gives me a thing that says... (1 Reply)
Discussion started by: BangYourWallnut
1 Replies

3. Solaris

need script for locked and unused user accounts in /export/home directory

Hi all, i have to need one script: 1. it will capture the unused user accounts in /export/home directory. 2. it will capture the locked user accounts in /export/home directory. Note: locked accounts will show in /etc/passwd like /bin/false --> (instead of ksh it will show false) the... (1 Reply)
Discussion started by: krishna176
1 Replies

4. Shell Programming and Scripting

how to find out the home directory of a user??

Hi all, I would like to know how to find out the home directory of a particular user.. eg, If am the root , then my Home directory will be / if say am just a user logging into the terminal then my home dir would change, so accordingly i would like to know how to find it out... I know that... (7 Replies)
Discussion started by: wrapster
7 Replies

5. Shell Programming and Scripting

change home directory by modifying passwd

hi How can I change the home directory of a user without using usermod -d command? ( by modifying /etc/passwd) (17 Replies)
Discussion started by: tjay83
17 Replies

6. Solaris

Restricting SFTP user to a defined directory and home directory

Hi, I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP. The aim is to... (1 Reply)
Discussion started by: sftpuser
1 Replies

7. Red Hat

User's home directory

Hi, By default user's home directory will be /home/$user. I want to change it to /javauser/$user. How can I do it? Thanks Jeevan. (5 Replies)
Discussion started by: jredx
5 Replies

8. UNIX for Dummies Questions & Answers

User's home directory not being created

I am trying to create Oracle user. I will install oracle after that. But my problem is /home/oracle directory is not being created. bash-3.2# useradd -g oinstall -G dba,oper -d /home/oracle -m oracle cp: /home/oracle: Operation not applicable chown: /home/oracle: No such file or directory ... (3 Replies)
Discussion started by: hubatuwang
3 Replies

9. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies
pdfgrep(1)							   USER COMMANDS							pdfgrep(1)

NAME
pdfgrep - search pdf files for a regular expression SYNOPSIS
pdfgrep [OPTION...] PATTERN FILE... DESCRIPTION
Search for PATTERN in each FILE. PATTERN is an extended regular expression. pdfgrep works much like grep, with one distinction: It operates on pages and not on lines. OPTIONS
-i, --ignore-case Ignore case distinctions in both the PATTERN and the input files. -H, --with-filename Print the file name for each match. This is the default setting when there is more than one file to search. -h, --no-filename Suppress the prefixing of file name on output. This is the default setting when there is only one file to search. -n, --page-number Prefix each match with the number of the page where it was found. -c, --count Suppress normal output. Instead print the number of matches for each input file. Note that unlike grep, multiple matches on the same page will be counted individually. -C, --context NUM Print at most NUM characters of context around each match. The exact number will vary, because pdfgrep tries to respect word bound- aries. If NUM is "line", the whole line will be printed. If this option is not set, pdfgrep tries to print lines that are not longer than the terminal width. --color WHEN Surround file names, page numbers and matched text with escape sequences to display them in color on the terminal. (The default set- ting is auto). WHEN can be: always Always use colors, even when stdout is not a terminal. never Do not use colors. auto Use colors only when stdout is a terminal. -R, -r, --recursive Recursively search all files (restricted by --include and --exclude) under each directory. --exclude=GLOB Skip files whose base name matches GLOB. See glob(7) for wildcards you can use. You can use this option multiple times to exclude more patterns. It takes precedence over --include. Note, that in- and excludes apply only to files found via --recursive and not to the argument list. --include=GLOB Only search files whose base name matches GLOB. See --exclude for details. The default is *.pdf. --unac Remove accents and ligatures from both the search pattern and the PDF documents. This is useful if you want to search for a word containing 'ae', but the PDF uses the single character 'ae' instead. See unac(3) and unaccent(1) for details. [This option is experimental and only available if pdfgrep is compiled with unac support.] -q, --quiet Suppress all normal output to stdout. Errors will be printed and the exit codes will be returned (see below). --help Print a short summary of the options. -V, --version Show version information ENVIRONMENT VARIABLES
The behavior of pdfgrep is affected by the following environment variable. GREP_COLORS Specifies the colors and other attributes used to highlight various parts of the output. The syntax and values are like GREP_COLORS of grep. See grep(1) for more details. Currently only the capabilities mt, ms, mc, fn, ln and se are used by pdfgrep, where mt, ms and mc have the same effect on pdfgrep. EXIT STATUS
Normally, the exit status is 0 if at least one match is found, 1 if no match is found and 2 if an error occurred. But if the --quiet or -q option is used and a match was found, pdfgrep will return 0 regardless of errors. AUTHOR
Hans-Peter Deifel <hpdeifel at gmx.de> SEE ALSO
grep(1), regex(7) version 1.2 February 14, 2012 pdfgrep(1)
All times are GMT -4. The time now is 09:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy