Hi,
Is there any way to pass variable to a sed script.For awk we have -v option.like that do we have any way to pass variable to a sed script from a awk script or from normal script?
Thanx,
sounder (1 Reply)
Hi folks,
I'm looking for a solution to pass variables to a sed-command. I'm reading a lot of threats and also the q&a "How can I use a variable in sed?". None of these commands works. I'm using AIX 5.2.
I want to do the following:
NUMBER=` echo 38341` | sed -n '/$NUMBER/p'
an obtained... (3 Replies)
Hey all,
I'm wondering how you pass variable's that are defined in one script to another script that's been called by that first script.....
Best regards,
Jaz (1 Reply)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Hi All,
I need to pass 2 variables name 'vamskt' and 'vamsi'.
Here is my question:
delete from gpi.usergroup where usg_user_id in ('vamskt');
delete from gpi.userroles where uro_user_id in ('vamskt');
delete from gpi.user where usr_id in ('vamskt');
insert into gpi.user... (3 Replies)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
I have below data:
DAY1=10202013
I am trying below but not getting the desired output:
COUNT=1
DATE=DAY$COUNT
echo "Date is $DATE"
However output I am getting is:
Date is DAY1
I wanted the output as:
Date is 10202013
I tried following as well:
DAY1=10202013
COUNT=1... (3 Replies)
In a ksh, I'm attempting to pass my string of arguments to the mkuser command in a variable as follows...
cmd="pgrp=ACRGENU groups=ACRGENU home=/home/${USERID} shell=/usr/bin/ksh"
cmd=$cmd" gecos='${USERNAME}' login=true su=false rlogin=true daemon=true"
cmd=$cmd" admin=false... (4 Replies)
I'm reading a text file using a while loop but when I call a function from within this loop it exits that same iteration … even though there are many more lines in the file to be read.
I thought it was something to do with the IFS setting but it appears that a function call (when run... (3 Replies)
Discussion started by: user052009
3 Replies
LEARN ABOUT REDHAT
psf
PSF(8) System Manager's Manual PSF(8)NAME
psf - PostScript filter
SYNOPSIS
psf [ -n name ] [ -h host ] [ -w width ] [ -l length ] [ -i indent ] [ -c ]
DESCRIPTION
psf is an lpd filter for PostScript printing. psf interprets the name it was called with to determine what filters to invoke. First, if
the string ``pap'' appears anywhere in the name, psf invokes pap to talk to a printer via AppleTalk. Next, if the string ``rev'' appears,
psf invokes psorder to reverse the pages of the job. Finally, if psf was called with a filter's name as the leading string, it invokes that
filter. If there is no filter to run, psf examines the magic number of the input, and if the input is not PostScript, converts it to Post-
Script.
KLUDGE
In the default configuration, psf supports two kludges. The first causes psf to check its name for the letter `m'. If this letter is
found and accounting is turned on, psf calls pap twice, once to get an initial page count and to print the job, and another time to get a
final page count. This is a work-around for bugs in a variety of PAP implementions that cause printers to never properly close the PAP
output file. A notable example is any printer by Hewlett-Packard.
The second kludge causes psf to examine its name for the letter `w'. If this letter is found and accounting is turned on, psf calls pap
with the -w flag. This flag causes pap to wait until the printer's status contains the string `idle'. Once this string is found, the job
is printed as normal. This kludge is a work-around for printers, notably Hewlett-Packard's LaserJet IV, which will report a page count
while a previous jobs is still printing.
EXAMPLE
The sample printcap entry below invokes psf to print text files, PostScript files, troff's C/A/T output, and TeX's DVI output, to an
AppleTalk connected LaserWriter Plus. Since the LaserWriter Plus stacks pages in descending order, we reverse the pages and print the burst
page last.
laser|lp|LaserWriter Plus on AppleTalk:
:sd=/usr/spool/lpd/laser:
:lp=/usr/spool/lpd/laser/null:
:lf=/var/adm/lpd-errs:pw#80:hl:
:of=/usr/lib/filters/ofpap:
:if=/usr/lib/filters/ifpaprev:
:tf=/usr/lib/filters/tfpaprev:
:df=/usr/lib/filters/dfpaprev:
Note that if the host in question spools to more than one AppleTalk printer, /dev/null should not be used for the lp capability. Instead, a
null device should be created with mknod for each printer, as has been done above.
Finally, there is a file in the spool directory, /var/spool/lpd/laser, called .paprc, which pap reads for the AppleTalk name of the
printer.
SEE ALSO psorder(1), printcap(5), lpd(8), mknod(8), pap(8).
netatalk 1.2 17 Dec 1991 PSF(8)