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 BSD
lpc
LPC(8) System Manager's Manual LPC(8)NAME
lpc - line printer control program
SYNOPSIS
/usr/sbin/lpc [ command [ argument ... ] ]
DESCRIPTION
Lpc is used by the system administrator to control the operation of the line printer system. For each line printer configured in
/etc/printcap, lpc may be used to:
o disable or enable a printer,
o disable or enable a printer's spooling queue,
o rearrange the order of jobs in a spooling queue,
o find the status of printers, and their associated spooling queues and printer dameons.
Without any arguments, lpc will prompt for commands from the standard input. If arguments are supplied, lpc interprets the first argument
as a command and the remaining arguments as parameters to the command. The standard input may be redirected causing lpc to read commands
from file. Commands may be abreviated; the following is the list of recognized commands.
? [ command ... ]
help [ command ... ]
Print a short description of each command specified in the argument list, or, if no arguments are given, a list of the recognized
commands.
abort { all | printer ... }
Terminate an active spooling daemon on the local host immediately and then disable printing (preventing new daemons from being
started by lpr) for the specified printers.
clean { all | printer ... }
Remove any temporary files, data files, and control files that cannot be printed (i.e., do not form a complete printer job) from the
specified printer queue(s) on the local machine.
disable { all | printer ... }
Turn the specified printer queues off. This prevents new printer jobs from being entered into the queue by lpr.
down { all | printer } message ...
Turn the specified printer queue off, disable printing and put message in the printer status file. The message doesn't need to be
quoted, the remaining arguments are treated like echo(1). This is normally used to take a printer down and let others know why (lpq
will indicate the printer is down and print the status message).
enable { all | printer ... }
Enable spooling on the local queue for the listed printers. This will allow lpr to put new jobs in the spool queue.
exit
quit
Exit from lpc.
restart { all | printer ... }
Attempt to start a new printer daemon. This is useful when some abnormal condition causes the daemon to die unexpectedly leaving
jobs in the queue. Lpq will report that there is no daemon present when this condition occurs. If the user is the super-user, try
to abort the current daemon first (i.e., kill and restart a stuck daemon).
start { all | printer ... }
Enable printing and start a spooling daemon for the listed printers.
status { all | printer ... }
Display the status of daemons and queues on the local machine.
stop { all | printer ... }
Stop a spooling daemon after the current job completes and disable printing.
topq printer [ jobnum ... ] [ user ... ]
Place the jobs in the order listed at the top of the printer queue.
up { all | printer ... }
Enable everything and start a new printer daemon. Undoes the effects of down.
FILES
/etc/printcap printer description file
/usr/spool/* spool directories
/usr/spool/*/lock lock file for queue control
SEE ALSO lpd(8), lpr(1), lpq(1), lprm(1), printcap(5)DIAGNOSTICS
?Ambiguous command abreviation matches more than one command
?Invalid command no match was found
?Privileged command command can be executed by root only
4.2 Berkeley Distribution November 1, 1996 LPC(8)