Sponsored Content
Full Discussion: grep for pattern
Top Forums Shell Programming and Scripting grep for pattern Post 302192970 by penchal_boddu on Thursday 8th of May 2008 07:35:07 AM
Old 05-08-2008
awk '$5==255 || $5==106 || $5==107 || $5==108 {print $0}' filename

Thanks
penchal
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to grep this pattern??

Hi All, I have a file like this, from this file I want to grep only this "package com.att.com;".... even though spaces are present at starting of the line. i.e., the o/p should ignore these two lines from the file : asdasdasd package ; ignore this line asdasdasd adsfkl90-9-0 package... (13 Replies)
Discussion started by: askumarece
13 Replies

2. Shell Programming and Scripting

how to grep the pattern ?

how to grep the pattern ? How can I grep or find the pattern from this files in the directory. I have couple of ascii files too.I have to grep the binary files.Please assist me Thanks Francis (2 Replies)
Discussion started by: faviji
2 Replies

3. Shell Programming and Scripting

Want to grep for a pattern and display the content above that pattern

Hi, When we have a failure, sometimes we just step restart the job from the next step. Later when we open the log for analysis of the failure, it is becoming difficult to go to the failure part. For eg., if it is a 1000 line log, the failure may be at 500th line. so wat i want to do is, grep... (6 Replies)
Discussion started by: ajayakunuri
6 Replies

4. Emergency UNIX and Linux Support

Grep pattern

I have to search from millions of lines of code of lines having following pattern: get_token , get_token For example: fn1(string.get_token(), string1.get_token()); Thanks in advance (5 Replies)
Discussion started by: uunniixx
5 Replies

5. Shell Programming and Scripting

Grep the word from pattern line and update in subsequent lines till next pattern line reached

Hi, I have got the below requirement. please suggest. I have a file like, Processing Item is: /data/ing/cfg2/abc.txt /data/ing/cfg3/bgc.txt Processing Item is: /data/cmd/for2/ght.txt /data/kernal/config.klgt.txt I want to process the above file to get the output file like, ... (5 Replies)
Discussion started by: rbalaj16
5 Replies

6. Shell Programming and Scripting

How to Grep than scan line below grep pattern

Hello Colleagues, I have a file that looks like below. 6-12731913-12731913 9230760143480 410018547148230 20131002193434+0500 20131002193434+0500 ;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0 20131009 92220056296730 CC0P abc Core_Context_R1A SMS 6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies

7. Shell Programming and Scripting

sed and awk usage to grep a pattern 1 and with reference to this grep a pattern 2 and pattern 3

Hi , I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows. # diff mir_lex.c.modified mir_lex.c.orig 3209c3209 < if(yy_current_buffer -> yy_is_our_buffer == 0) { --- >... (5 Replies)
Discussion started by: breezevinay
5 Replies

8. Shell Programming and Scripting

Grep lines before a pattern having some other pattern

Hi All, I am trying to fetch lines before a pattern, I got to know about -B flag in grep but we have to pass the number to get those lines before some pattern say (X), now what if I want to get line/s with some other pattern say (Y) before X pattern? How to get about it? please help. Input:... (5 Replies)
Discussion started by: dips_ag
5 Replies

9. UNIX for Dummies Questions & Answers

Grep -v lines starting with pattern 1 and not matching pattern 2

Hi all! Thanks for taking the time to view this! I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern. Example: Drink a soda Eat a banana Eat multiple bananas Drink an apple juice Eat an apple Eat multiple apples I... (8 Replies)
Discussion started by: demmel
8 Replies

10. UNIX for Beginners Questions & Answers

Grep/awk using a begin search pattern and end search pattern

I have this fileA TEST FILE ABC this file contains ABC; TEST FILE DGHT this file contains DGHT; TEST FILE 123 this file contains ABC, this file contains DEF, this file contains XYZ, this file contains KLM ; I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
PTS_CREATEUSER(1)					       AFS Command Reference						 PTS_CREATEUSER(1)

NAME
pts_createuser - Creates a user or machine entry in the Protection Database SYNOPSIS
pts createuser -name <user name>+ [-id <user id>+] [-cell <cell name>] [-noauth] [-localauth] [-force] [-help] pts createu -na <user name>+ [-i <user id>+] [-c <cell name>] [-no] [-l] [-f] [-h] pts cu -na <user name>+ [-i <user id>+] [-c <cell name>] [-no] [-l] [-f] [-h] DESCRIPTION
The pts createuser command creates an entry in the Protection Database for each user or machine specified by the -name argument. A user entry name becomes the user's AFS username (the one to provide when authenticating with the AFS Authentication Server). A machine entry's name is the machine's IP address or a wildcard notation that represents a range of consecutive IP addresses (a group of machines on the same network). It is not possible to authenticate as a machine, but a group to which a machine entry belongs can appear on a directory's access control list (ACL), thereby granting the indicated permissions to any user logged on to the machine. AFS user IDs (AFS UIDs) are positive integers and by default the Protection Server assigns an AFS UID that is one greater than the current value of the "max user id" counter in the Protection Database, incrementing the counter by one for each user. To assign a specific AFS UID, use the -id argument. If any of the specified AFS UIDs is greater than the current value of the "max user id" counter, the counter is reset to that value. It is acceptable to specify an AFS UID smaller than the current value of the counter, but the creation operation fails if an existing user or machine entry already has it. To display or set the value of the "max user id" counter, use the pts listmax or pts setmax command, respectively. The issuer of the pts createuser command is recorded as the entry's creator and the group system:administrators as its owner. CAUTIONS
The Protection Server reserves AFS UID 0 (zero) and returns an error if the -id argument has that value. OPTIONS
-name <user name>+ Specifies either a username for a user entry, or an IP address (complete or wildcarded) for a machine entry: o A username can include up to 63 numbers and lowercase letters, but it is best to make it shorter than eight characters, because many application programs cannot handle longer names. Also, it is best not to include shell metacharacters or other punctuation marks. In particular, the colon (":") and at-sign ("@") characters are not acceptable. The period is generally used only in special administrative names, to separate the username and an instance, as in the example "pat.admin". o A machine identifier is its IP address in dotted decimal notation (for example, 192.12.108.240), or a wildcard notation that represents a set of IP addresses (a group of machines on the same network). The following are acceptable wildcard formats. The letters "W", "X", "Y" and "Z" each represent an actual number from the range 1 through 255. o W.X.Y.Z represents a single machine, for example 192.12.108.240. o W.X.Y.0 matches all machines whose IP addresses start with the first three numbers. For example, 192.12.108.0 matches both 192.12.108.119 and 192.12.108.120, but does not match 192.12.105.144. o W.X.0.0 matches all machines whose IP addresses start with the first two numbers. For example, the address 192.12.0.0 matches both 192.12.106.23 and 192.12.108.120, but does not match 192.5.30.95. o W.0.0.0 matches all machines whose IP addresses start with the first number in the specified address. For example, the address 192.0.0.0 matches both 192.5.30.95 and 192.12.108.120, but does not match 138.255.63.52. Do not define a machine entry with the name 0.0.0.0 to match every machine. The system:anyuser group is equivalent. -id <user id>+ Specifies an AFS UID for each user or machine entry, rather than allowing the Protection Server to assign it. Provide a positive integer. If this argument is used and the -name argument names multiple new entries, it is best to provide an equivalent number of AFS UIDs. The first UID is assigned to the first entry, the second to the second entry, and so on. If there are fewer UIDs than entries, the Protection Server assigns UIDs to the unmatched entries based on the "max user id" counter. If there are more UIDs than entries, the excess UIDs are ignored. If any of the UIDs is greater than the current value of the "max user id" counter, the counter is reset to that value. -cell <cell name> Names the cell in which to run the command. For more details, see pts(1). -force Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the first error. -help Prints the online help for this command. All other valid options are ignored. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or -noauth options. For more details, see pts(1). -noauth Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1). OUTPUT
The command generates the following string to confirm creation of each user: User <name> has id <id> EXAMPLES
The following example creates a Protection Database entry for the user "johnson". % pts createuser -name johnson The following example creates three wildcarded machine entries in the ABC Corporation cell. The three entries encompass all of the machines on the company's networks without including machines on other networks: % pts createuser -name 138.255.0.0 192.12.105.0 192.12.106.0 PRIVILEGE REQUIRED
The issuer must belong to the system:administrators group. SEE ALSO
pts(1), pts_listmax(1), pts_setmax(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2014-04-08 PTS_CREATEUSER(1)
All times are GMT -4. The time now is 09:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy