Sponsored Content
Full Discussion: Arguments to awk
Top Forums Shell Programming and Scripting Arguments to awk Post 302462915 by kristinu on Friday 15th of October 2010 09:39:01 AM
Old 10-15-2010
I need to, as I want the user to pass the values through and then do something with the values he supplies.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to print arguments along with spaces using awk

Hi All, file_1.txt contains aaa bbbb hhhh vvvvv mmmmm iiiii What i want is to search for the first coloumn of each line using awk.i.e as below: awk '/aaa/ {printf(<>)}' file_1.txt The print part (<>) should contain all the values(or coloumns ) in the particular line(here it... (8 Replies)
Discussion started by: jisha
8 Replies

2. Shell Programming and Scripting

awk arguments

Having arguments as follows There are totally 210 error codes. I have already grep custom logs as follows checkerr.sh A awk '$1 == 0 || $1 ==1{print $0}' rep1.txt > success.log B awk '$1 == 84 || $1 ==85 || $1==86 {print $0}' rep1.txt > MediaErr.log i need all the other 205 error... (6 Replies)
Discussion started by: karthikn7974
6 Replies

3. Shell Programming and Scripting

How do we pass multiple arguments into awk

How do we pass multiple arguments into awk : name=john age=12 now i have to pass both age and name into awk.. how to do it? like : awk -v var=... (4 Replies)
Discussion started by: abhinav192
4 Replies

4. Shell Programming and Scripting

awk with arguments

Hi I have a file which looks like this: $ cat my_file f1acc: 1398 f1pdb: 495 f1trn: 1288 f1txn: 7326 t1trn: 8241 t1txn: 8292 p080$ I am trying to "egrep" a certain pattern from this file and put a value of a variable in front of each line, for example: pnum=555 cat my_file |... (5 Replies)
Discussion started by: aoussenko
5 Replies

5. Shell Programming and Scripting

Pass command line arguments to awk

I am trying to pass max as a sommand line argument when I call awk. Made the modification in the BEGIN but it is not working I'm getting an error as below: awk: txsrx.awk:82: (FILENAME=jcd.tx FNR=4161) fatal: cannot open file `40' for reading (No such file or directory) Somehow it... (2 Replies)
Discussion started by: kristinu
2 Replies

6. Shell Programming and Scripting

Passing arguments to awk

I have an awk script below which I call using for example awk -f ../../A-Scripts/select-model.awk iterations.txt 16x12 10 I want to be able to use it in a different way like this awk -f ../../A-Scripts/select-model.awk iterations.txt nxz=16x12 iter=10 or awk -f... (1 Reply)
Discussion started by: kristinu
1 Replies

7. Shell Programming and Scripting

awk with arguments

Hi guys, I work in ksh and have a file in the following format: T 18:30 10 23:00 ts1632back W 18:30 10 23:00 ts1632back M 19:30 0 0 tschkback_px1632 T 19:30 0 0 tschkback_px1632 I am using the following 'awk' command to substitute field/colomn 2 across the file if field/colomn 5 is set to... (6 Replies)
Discussion started by: aoussenko
6 Replies

8. Shell Programming and Scripting

Using and passing arguments to shuf within awk

Hello all, I would like to output a random number within a range for every line using awk and shuf. I think I'm almost there, but I don't know how to pass arguments to shuf within my awk script: Input 1 12190 12227 1 12595 12721 1 13403 13639 1 14362 14829 1 14970 15038 awk: awk '{... (2 Replies)
Discussion started by: DerSeb
2 Replies

9. Shell Programming and Scripting

Need to pass shell arguments into Nawk/awk

Hi, I am in critical need of help, Thanks a ton for your help. I need to know how to pass the shell argument into nawk code in AIX. so that my file gets passed into that awk script and it can execute it part. To be detail, i have more than 100 files and in those files a particular field... (6 Replies)
Discussion started by: Selva_2507
6 Replies

10. Shell Programming and Scripting

awk command line arguments not taking

# more minusf.awk #!/bin/awk -f BEGIN { FS=":"; } { if ( $2 == "" ) { print $1 ": no password!"; } } # ./minusf.awk aa aa aa aa awk: can't open aa (6 Replies)
Discussion started by: sri.phani
6 Replies
pam_sm_authenticate(3)					     Library Functions Manual					    pam_sm_authenticate(3)

NAME
pam_sm_authenticate - Service provider implementation for pam_authenticate SYNOPSIS
[ flag ... ] file ... [ library ... ] DESCRIPTION
In response to a call to pam_authenticate(3), the PAM framework calls from the modules listed in the pam.conf(4) file. The authentication provider supplies the back-end functionality for this interface function. The function, is called to verify the identity of the current user. The user is usually required to enter a password or similar authenti- cation token depending upon the authentication scheme configured within the system. The user in question is specified by a prior call to and is referenced by the authentication handle, pamh. If the user is unknown to the authentication service, the service module should mask this error and continue to prompt the user for a pass- word. It should then return the error, The following flag may be passed in to The authentication service should not generate any messages. The authentication service should return if the user has a null authentication token. The argc argument represents the number of module options passed in from the configuration file pam.conf(4). argv specifies the module options, which are interpreted and processed by the authentication service. Please refer to the specific module manual pages for the vari- ous available options. If any unknown option is passed in, the module should log the error and ignore the option. Before returning, should call and retrieve If it has not been set before (ie. the value is NULL), should set it to the password entered by the user using An authentication module may save the authentication status (success or reason for failure) as state in the authentication handle using This information is intended for use by APPLICATION USAGE
Refer to pam(3) for information on thread-safety of PAM interfaces. NOTES
Modules should not retry the authentication in the event of a failure. Applications handle authentication retries and maintain the retry count. To limit the number of retries, the module can return a error. RETURN VALUES
Upon successful completion, must be returned. In addition, the following values may be returned: Maximum number of authentication attempts exceeded. Authentication failure. Can not access authentication data due to insufficient credentials. Underlying authentication service can not retrieve authentication information. User not known to underlying authentication module. Ignore underlying authentication module regardless of whether the control flag is or SEE ALSO
pam(3), pam_authenticate(3), pam.conf(4), pam_user.conf(4). pam_sm_authenticate(3)
All times are GMT -4. The time now is 08:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy