05-19-2010
I think we had that already in your 2 other threads, building your commands together by those printer informations etc.. At the end I think I am not able to help you, sorry. Hopefully another user here can.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a variable which is not being populated with the contents of a text file, and I'm wondering if anyone happens to know how to do this for a sh type script?
#!/bin/sh
set alertperson = cat /export/home/bdodym/alert.person
if
then
cat /export/home/bdodym/callout6.msg |... (6 Replies)
Discussion started by: tjhorwood
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need to place a number located in a text file in a variable so I can perform if/then comparison. How would I go about doing this? Using A=awk '{print $2}' maintenance_date.tmp does not seem to work.
Thanks (1 Reply)
Discussion started by: mojoman
1 Replies
3. UNIX for Dummies Questions & Answers
Hi Gurus,
I am new to unix.I have a requirement as below
I have text file like a.txt which contains
a.txt
hi hello
process update
status
Ok to Proceed no issues good
data arrangement
My requirement here is i need to read the file and check for the words
"OK to Proceed" and if... (2 Replies)
Discussion started by: pssandeep
2 Replies
4. Shell Programming and Scripting
Hi
I have a text file (mytext.txt), the content of which is as following:
My name is <@MY_NAME@> and my age is <@MY_AGE@> .
Now i have another property file (myprops) which is as following:
MY_NAME=abcdefgh
MY_AGE=000000
I was wondering, how can i replace the tags of mytext.txt, with its... (1 Reply)
Discussion started by: vigithvg
1 Replies
5. Shell Programming and Scripting
I have a txt file
output.txt
Freq = 1900
L = 159I want to assign the values to a variable so that i can further use it in some other script.
like
F=1900
Len=159
etc
i tried doing something with awk but dosent work
F=$(awk 'BEGIN {}/Freq/ {split ($2,a);depth=a};printf "%d\t,... (2 Replies)
Discussion started by: shashi792
2 Replies
6. Shell Programming and Scripting
Hi,
I'm making a script that automaticaly set file size and path in xml file.
I tried with :
sed -i 's/BOOTPATH/TEST/g' file.xml
it works fine
but if I use a viriable :
sed -i 's/BOOTPATH/$bootpathf/g' file.xml
with this one, no change are made.
I don't understand why. If a make a ... (13 Replies)
Discussion started by: Toug
13 Replies
7. Shell Programming and Scripting
Hi Guys,
I have one text file ABC.txt...It have 3 lines
List=/home/klk/dir/ABC.txt
Leajnk123
KJUHIO1234
IJOKIJ7676
I want use as different variable of each line.Just like
X=firstline
Y=Secound Line
Z=Third Line (4 Replies)
Discussion started by: asavaliya
4 Replies
8. Shell Programming and Scripting
i have a text file consists of different file names like:
line 1: lib/libIMb.so message broker file
line 2: lil/imbdfg.lil message broker file
i need to extract libIMb.so and imbdfg.lil files from those lines and save them in a variable. so that i can search for... (9 Replies)
Discussion started by: santosh2626
9 Replies
9. UNIX for Dummies Questions & Answers
Hey guys,
I need to write a script that will add a specific text at the end of a specific line (of a text file). but the line is a variable
this is my text file :
device_2 ansible_ssh_host=127.0.0.1 ansible_ssh_port=30000 ansible_ssh_user='root'
device_2 ansible_ssh_host=127.0.0.1... (1 Reply)
Discussion started by: OdedOvdat
1 Replies
10. Shell Programming and Scripting
I have a text file that has many lines, and for each line I need to extract different sections of text, then write several variables from the data.
I can split out the various sections by selecting their position on each line as the column sizes will never vary.
A sample of my text file is below... (2 Replies)
Discussion started by: kcpoole
2 Replies
LPC(8) BSD System Manager's Manual LPC(8)
NAME
lpc -- line printer control program
SYNOPSIS
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 daemons.
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 abbreviated; 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 argument is given, a list of the recognized com-
mands.
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(1)) 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(1).
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(1) 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(1) 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(1) 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
/var/spool/output/* spool directories
/var/spool/output/*/lock lock file for queue control
DIAGNOSTICS
?Ambiguous command
abbreviation matches more than one command
?Invalid command
no match was found
?Privileged command
you must be a member of group "operator" or root to execute this command
SEE ALSO
lpq(1), lpr(1), lprm(1), printcap(5), lpd(8)
HISTORY
The lpc command appeared in 4.2BSD.
BSD
April 28, 1995 BSD