Sponsored Content
Top Forums Shell Programming and Scripting Print pattern regardless of space between Post 302769353 by anil510 on Tuesday 12th of February 2013 03:46:11 AM
Old 02-12-2013
Print pattern regardless of space between

I have this content in file

Code:
sshd : ALL : allow
SSHD   :  all     : ALLOW
sshD  :  All  :       AllOW

What I need is to print the occurrence of "sshd:all" regardless of the spaces between them and if lower/upper case. So all lines should be printed in output when "grepped" or "printed using awk/sed"
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find a pattern and print next all character to next space

Hi, I have a big inventory file that is NOT sorted is any way. The file is have "tagged" information like the ip address "*IP=" or the name "*NM=" . How do I get just the ip address or the name and not the whole line? I have tried to use AWK without any success. I always get the whole line... (8 Replies)
Discussion started by: pierrebjarnfelt
8 Replies

2. Shell Programming and Scripting

Print a pattern between the xml tags based on a search pattern

Hi all, I am trying to extract the values ( text between the xml tags) based on the Order Number. here is the sample input <?xml version="1.0" encoding="UTF-8"?> <NJCustomer> <Header> <MessageIdentifier>Y504173382</MessageIdentifier> ... (13 Replies)
Discussion started by: oky
13 Replies

3. Shell Programming and Scripting

Print characters till the next space when the pattern is found

i have a file which contains alphanumeric data in every line. what i need is the data after certain pattern. the data after the pattern is not of fixed length so i need the data till the space after the pattern. Input file: bfdkasfbdfg khffkf lkdhfhdf pattern (datarequired data not required)... (2 Replies)
Discussion started by: gpk_newbie
2 Replies

4. Shell Programming and Scripting

print lines up to pattern excluding pattern

11 22 33 44 55 66 77 When pattern 55 is met, print upto it, so output is 11 22 33 44 (1 Reply)
Discussion started by: anilcliff
1 Replies

5. Shell Programming and Scripting

Need one liner to search pattern and print everything expect 6 lines from where pattern match made

i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies

6. Shell Programming and Scripting

Script to compare pattern and print a different pattern in each line

Hi, I am writing a shell script to parse some files, and gather data. The data in the files is displayed as below. .......xyz: abz: ......qrt: .... .......xyz: abz: ......qrt: ... I have tried using awk and cut, but the position of these values keep changing, so I wasn't able to get... (2 Replies)
Discussion started by: Serena
2 Replies

7. UNIX for Dummies Questions & Answers

Match Pattern after certain pattern and Print words next to Pattern

Hi experts , im new to Unix,AWK ,and im just not able to get this right. I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Discussion started by: 100bees
2 Replies

8. Shell Programming and Scripting

Match Pattern and print pattern and multiple lines into one line

Hello Experts , require help . See below output: File inputs ------------------------------------------ Server Host = mike id rl images allocated last updated density vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies

9. Shell Programming and Scripting

sed -- Find pattern -- print remainder -- plus lines up to pattern -- Minus pattern

The intended result should be : PDF converters 'empty line' gpdftext and pdftotext?xml version="1.0"?> xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies

10. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies
pam_deny(5)						Standards, Environments, and Macros					       pam_deny(5)

NAME
pam_deny - PAM authentication, account, session and password management PAM module to deny operations SYNOPSIS
pam_deny.so.1 DESCRIPTION
The pam_deny module implements all the PAM service module functions and returns the module type default failure return code for all calls. The following options are interpreted: debug syslog(3C) debugging information at the LOG_AUTH|LOG_DEBUG levels ERRORS
The following error codes are returned: PAM_ACCT_EXPIRED If pam_sm_acct_mgmt is called. PAM_AUTH_ERR If pam_sm_authenticate is called. PAM_AUTHOK_ERR If pam_sm_chauthtok is called. PAM_CRED_ERR If pam_sm_setcred is called. PAM_SESSION_ERR If pam_sm_open_session or pam_sm_close_session is called. EXAMPLES
Example 1 Disallowing ssh none authentication sshd-none auth requisite pam_deny.so.1 sshd-none account requisite pam_deny.so.1 sshd-none session requisite pam_deny.so.1 sshd-none password requisite pam_deny.so.1 Example 2 Disallowing any service not explicitly defined other auth requisite pam_deny.so.1 other account requisite pam_deny.so.1 other session requisite pam_deny.so.1 other password requisite pam_deny.so.1 ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT Level |MT-Safe with exceptions | +-----------------------------+-----------------------------+ SEE ALSO
su(1M), libpam(3LIB), pam(3PAM), pam_sm_authenticate(3PAM), syslog(3C), pam.conf(4), nsswitch.conf(4), attributes(5), pam_authtok_check(5), pam_authtok_get(5), pam_authtok_store(5), pam_dhkeys(5), pam_passwd_auth(5), pam_unix_account(5), pam_unix_auth(5), pam_unix_session(5), privileges(5) NOTES
The interfaces in libpam(3LIB) are MT-Safe only if each thread within the multi-threaded application uses its own PAM handle. The pam_deny module is intended to deny access to a specified service. The other service name may be used to deny access to services not explicitly specified. SunOS 5.11 16 Jun 2005 pam_deny(5)
All times are GMT -4. The time now is 09:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy