Actual file might actually be like this. Want to strip away the first entry but remember the value in the line 0.50 where I need to divide the last number with 0.50
Actually it would be good to store the value 0.50 and store it so I can determine 1/(0.5*0.5), then multiply
the last number by this value.
I have a situation where I want the user to enter only numbers in response to a READ command. I have some validation to restrict the number to be between 1 and 12, but if the user type in some characters the script echoes some error message and goes to the next command. Below is a snippet of the... (1 Reply)
Hi,
How would I get rid of lines having something else than numbers (such as tabs,white space, special characters, empty line, letters).
So I have big file with numers as follows:
12345678901
23456789012
32343678901
42345638901
52345678901
and I sometimes the file might contain some... (2 Replies)
Hello,
I have a command that I need to supply a negative number as a parameter; how do I do this? I have tried giving it with double quotes, "", but no avail.
Thanks,
Gussi (3 Replies)
Hi,
I have a series of BASH shell scripts that run together. I would like it so that these scripts construct a log file as they run. This log file would ideally be a text file that contains exactly (including blank lines) what is output to the terminal.
What is the best way to accomplish... (3 Replies)
I have a text file, data.txt, which looks like :-
head1 head2 head3
data1 1 data 1 2 data 1 3
data 2 1 data 2 2 data 2 3
data 3 1 data 3 2 data 3 3
etc etc
I would like to print this file, using the lp -d command,
with a heading line, as follows :-
Report for whatever department as... (2 Replies)
Hi,
My script ask for the input of two numbers in the middle of it.
I would like to know how to indicate this two numbers when I submit the script.
thanks for any help,
jalves (4 Replies)
I have the following input:
xxxx-2.7.19_WR3
I have extract the following:
2.7.19
Can anyone suggest an awk or sed command to do the above...:confused:
another condition is
if the input is :
xxx-xxx_xxx-1.4-1_WR3.0bg.armv6jel_vfp
it shud still extract : 1.4-1
whenever "-"... (12 Replies)
Hi,
I do have couple of files in a folder. The names of each of the files have a pattern.
ahet_005678.txt
ahet_005898.txt
ahet_007678.txt
ahet_004778.txt
...
...
ahet_002378.txt
Each of the above files have the same pattern of data with 4 columns and have an header for the last 3... (4 Replies)
I have a file full of coordinates of the form:
37.68899917602539 58.07500076293945 57.79100036621094
The numbers don't always have the same number of decimal points. I need to reduce the decimal points of all the numbers (there are 128 rows of 3 numbers) to 2.
I have tried to do this... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies
LEARN ABOUT LINUX
pam_filter
PAM_FILTER(8) Linux-PAM Manual PAM_FILTER(8)NAME
pam_filter - PAM filter module
SYNOPSIS
pam_filter.so [debug] [new_term] [non_term] run1|run2 filter [...]
DESCRIPTION
This module is intended to be a platform for providing access to all of the input/output that passes between the user and the application.
It is only suitable for tty-based and (stdin/stdout) applications.
To function this module requires filters to be installed on the system. The single filter provided with the module simply transposes upper
and lower case letters in the input and output streams. (This can be very annoying and is not kind to termcap based editors).
Each component of the module has the potential to invoke the desired filter. The filter is always execv(2) with the privilege of the
calling application and not that of the user. For this reason it cannot usually be killed by the user without closing their session.
OPTIONS
debug
Print debug information.
new_term
The default action of the filter is to set the PAM_TTY item to indicate the terminal that the user is using to connect to the
application. This argument indicates that the filter should set PAM_TTY to the filtered pseudo-terminal.
non_term
don't try to set the PAM_TTY item.
runX
In order that the module can invoke a filter it should know when to invoke it. This argument is required to tell the filter when to do
this.
Permitted values for X are 1 and 2. These indicate the precise time that the filter is to be run. To understand this concept it will be
useful to have read the pam(3) manual page. Basically, for each management group there are up to two ways of calling the module's
functions. In the case of the authentication and session components there are actually two separate functions. For the case of
authentication, these functions are pam_authenticate(3) and pam_setcred(3), here run1 means run the filter from the pam_authenticate
function and run2 means run the filter from pam_setcred. In the case of the session modules, run1 implies that the filter is invoked at
the pam_open_session(3) stage, and run2 for pam_close_session(3).
For the case of the account component. Either run1 or run2 may be used.
For the case of the password component, run1 is used to indicate that the filter is run on the first occasion of pam_chauthtok(3) (the
PAM_PRELIM_CHECK phase) and run2 is used to indicate that the filter is run on the second occasion (the PAM_UPDATE_AUTHTOK phase).
filter
The full pathname of the filter to be run and any command line arguments that the filter might expect.
MODULE TYPES PROVIDED
All module types (auth, account, password and session) are provided.
RETURN VALUES
PAM_SUCCESS
The new filter was set successfully.
PAM_ABORT
Critical error, immediate abort.
EXAMPLES
Add the following line to /etc/pam.d/login to see how to configure login to transpose upper and lower case letters once the user has logged
in:
session required pam_filter.so run1 /lib/security/pam_filter/upperLOWER
SEE ALSO pam.conf(5), pam.d(5), pam(7)AUTHOR
pam_filter was written by Andrew G. Morgan <morgan@kernel.org>.
Linux-PAM Manual 06/04/2011 PAM_FILTER(8)