You can programatically answer program prompts, in a script this is called a here document:
I have not used hppi, so I don't know what you mean by select. Once you start a here doc, ALL of the answers have to be pre-programmed. I'll create something for you to work with - YOU need to change it.
execute
so you can run the script
usage: ./set_pr.sh printer34 OptionA
If you need help with changing the script let us know.
This User Gave Thanks to jim mcnamara For This Post:
I've been successfully running a daily cron script to backup certain things on my server but just recently I started getting input/output errors for everything. For each directory the script tries to backup I now get this:
cp: accessing `/mnt/backup/**dir**/': Input/output error (8 Replies)
I want to prompt a user for input but I want it to timeout after a specified time if no response is given. I tried the sleep command but this does not work. I am using ksh.
Thanks. (10 Replies)
Script 1.ksh
=========
/home/adw/a.ksh << **
a
b
Script 1.ksh is working fine even without ending "**"
Script 2.ksh
=========
if then
/home/adw/a.ksh << **
a
b
fi
But the script 2.ksh is giving error "syntax error : `<<' unmatched".
Is it bcoz of fi. (1 Reply)
/home/adw/a.ksh << EOF
a
b
EOF
This is how we give input to a file through script
Our client has done the coding in a different way :-
/home/adw/a.ksh << **
a
b
Can nybody pls tell me the significance of ** (7 Replies)
My C++ program creates a nxn matrix with given value. For e.g if the input is 10 it will creates a matrix of 10x10 now what i want is the script should run program and give input values in a variation of 1000. Say first matrix of 1000 then 2000 , 3000 ..... 10000. I tried using for loop but unable... (2 Replies)
Hi all,
I have a problem with qwk command.
i have to check process status and for that i am using command
prstat -mvL 1 1
and it gives me the entire output
but when i use this command with awk like this:
prstat -mvL 1 1 | awk -F" " '{print $1,$15}'
to get first and 15th arguments.
... (3 Replies)
i'm calling a python script from shell script. the python needs Y as an input everytime. how can i giv it thru shell script.
I tried below code
for arg in `cat erd_gen_list.lst`
do
generateErdSql.py -S $arg << Y
done
This is giving me err : `<<' unmatched
pls help. (1 Reply)
Hi,
Please help me,its urgent.
I have a tool that i want to run from a shell script. When we run the tool it will ask the user choice to add or delete. When user enter the choice it will then ask how many units he want to delete or add and will add or delete accordingly.
Now I want to... (1 Reply)
Hi all,
I am looking for a specific requirement. I am trying to create a wrapper over a set of shell scripts. Some shell scripts wait for user inputs. These inputs may not be same format. And will be spread across multiple files.
In short a set of scripts are going to be run on another set... (1 Reply)
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
LEARN ABOUT OPENSOLARIS
gsinterface
GSinterface(1) General Commands Manual GSinterface(1)NAME
GSinterface - LP interface script for using ghostscript under lpsched
SYNOPSIS
GSinterface [request-id] [user] [title] [copies] [options] [files]
DESCRIPTION
This shell script is intended to be uses as an LP interface script on Solaris 2.6 and later systems. It allows print queues to be config-
ured under LP using Ghostscript to render for the printer.
Configuration under lpsched is performed via the lpadmin(1M) command.
# lpadmin -p printer -v /dev/... -I"postscript,pdf" -Tunknown-i /usr/sfw/share/ghostscript/interfaces/GSinterface
-o GS_DEVICE=(gs-device-type)
[-o OutputFile=(file/device)] [-o PAPERSIZE=(size)]
[-o RESOLUTION=XxY] [-o banner-type=(ascii|postscript)]
[-o GS_OPTIONS="-sIjsServer=... -sIjsParams=..."]
Valid values for the GS_DEVICE setting can be obtained from Ghostscript by running: "gs -h". This will dump a variety of information about
Ghostscript's usage and compile time configuration. The "Available devices:" section lists the formats that Ghostscript will render to.
You will need to match one of these formats to the format that your printer takes as input.
EXAMPLES
To configure a Canon Bublejet 800c (NeWSprinter CL+) printer connected to an ECP parallel port:
# lpadmin -p printer -v /dev/ecpp0 -I"postscript,pdf" -Tunknown-i /usr/sfw/share/ghostscript/interfaces/GSinterface
-o GS_DEVICE=bjc800
# accept printer
# enable printer
To configure an HP DeskJet 990 printer connected via a USB interface using IJS support:
# lpadmin -p printer -v /dev/usb/lp1 -I"postscript,pdf" -Tunknown-i /usr/sfw/share/ghostscript/interfaces/GSinterface
-o GS_DEVICE=ijs
-o GS_OPTIONS="-sIjsServer=hpijs -sDeviceManufacturer=HEWLETT-PACKARD -sDeviceModel='DESKJET 990' -DIjsUseOutputFD"
# accept printer
# enable printer
SEE ALSO gs(1)Ghostscript 15 October 2002 GSinterface(1)