Sponsored Content
Top Forums Shell Programming and Scripting Is it possible to create a here document by running a script interactively? Post 302738871 by snreddy_gopu on Monday 3rd of December 2012 04:22:39 AM
Old 12-03-2012
Is it possible to create a here document by running a script interactively?

hi,

i have script which installs around 20 packages. during installation of each package script will be prompted for user input.

i need to run the script in non-interactive by using here document. is it possible to generate here document by running the script in interactive mode on Solaris? Smilie

Thanks,
Satya
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How create a large list of document ids in VI

How can I create a large list of document ids, about a 1,000 or more in a list without having to type them in? If I can list these documents ids with one command I know how to transfer the output to a new vi list. But how can I strip unwanted extra information in this list and leave only the... (1 Reply)
Discussion started by: ruben7566
1 Replies

2. Shell Programming and Scripting

here document to automate perl script that call script

I am trying to use a here document to automate testing a perl script however when the perl script hits a system(perl subscript.pl) call, input is no longer entered into this subscript. here is my script $ cat test.sh #ksh for testcase do program <<-EOF | tee -a funcscnlog.log y... (3 Replies)
Discussion started by: hogger84
3 Replies

3. Programming

UNIX Shell Script to Create a Document of a PLSQL code.

Hi All, I am supposed to present the documentation for the PLSQL code (PACKAGES, PROCEDURE, FUNCTIONS) of my application. There are sufficient comments in my code. Has anyone written any Shell Script Utility which can parse the PLSQL code and generate some kind of document ( preferrably HTML not... (1 Reply)
Discussion started by: gauravsachan
1 Replies

4. Shell Programming and Scripting

Perl script for taking inputs from one script and storing them into a document.

Hi. I wanted to create a Perl script which can take the outputs of a Perl script as it's input and temporarily store them in a document. Need help. Thanks.:) (8 Replies)
Discussion started by: xtatic
8 Replies

5. Programming

extract xml data and create word document using perl.

hi, i have large xml file which contains students information, i need to extract student number and some address tags and create a word document for the extracted data. my data looking llike this <student> <number>24</number> <education>bachelors</education> ... (1 Reply)
Discussion started by: veerubiji
1 Replies

6. Programming

Extract xml data and create word document using perl.

Hi, I have large xml data file.I need to extract node and some tags in the node and after I need to create word document. my XMl data is look like as below -<student> <number>24</number> <education>bachelor</bachelor> <specialization>computers</specialization> ... (3 Replies)
Discussion started by: veerubiji
3 Replies

7. Shell Programming and Scripting

comamnds running interactively, failed in script wrigint

Hi all, I am trying to run these commands in shell script, but there seem to be some mistake. Somehow it is not accepting the last important comamnd "eval `scram runtime -sh`". However, when I try them interactively, it works all fine. $... (13 Replies)
Discussion started by: nrjrasaxena
13 Replies

8. UNIX for Dummies Questions & Answers

Help me to create html document

Hi all, I have to find the count from File. tsv and need the output file format will be in html using shell script. Ex: File.tsv A B C D 1 2 3 4 5 6 7 4 9 10 11 12 output in html: FileName Count A 3 (1 Reply)
Discussion started by: Shenbaga.d
1 Replies

9. UNIX for Beginners Questions & Answers

Expect scripting issue, works interactively when doing commands in cli, does not work in script

Hi; problem may be obvious, simple but I have to say it is somehow not easy to locate the issue. I am doing some word extracting from multiline text. Interacting in CLI seems to work without issues. First step is to add multiline text to a variable. expect1.1> expect1.1> set... (2 Replies)
Discussion started by: aldowski
2 Replies

10. UNIX for Beginners Questions & Answers

Command works interactively but not in bash script

The below command works in the terminal interactively but not as part of a bash script. I though maybe I needed to escape the "$dir" so it isn't interpreted literally, but that's not it. Thank you :). interactively in terminal dir=/path/to new=$(ls "$dir"/*.csv -tr | tail -n 1) && echo... (6 Replies)
Discussion started by: cmccabe
6 Replies
pkgask(1M)																pkgask(1M)

NAME
pkgask - stores answers to a request script SYNOPSIS
pkgask [-d device] [-R root_path] -r response pkginst... pkgask allows the administrator to store answers to an interactive package (one with a request script, that is, a user-created file that must be named request). Invoking this command generates a response file that is then used as input at installation time. The use of this response file prevents any interaction from occurring during installation since the file already contains all of the information the pack- age needs. The following options are supported -d device Run the request script for a package on device. device can be a directory pathname or the identifiers for tape, floppy disk or removable disk (for example, /var/tmp, /dev/diskette, and /dev/dsk/c1d0s0). The default device is the installation spool directory. -R root_path Define the full path name of a directory to use as the root_path. All files, including package system information files, are relocated to a directory tree starting in the specified root_path. Note - The root file system of any non-global zones must not be referenced with the -R option. Doing so might damage the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. See zones(5). -r response Identify a file or directory which should be created to contain the responses to interaction with the package. The name must be a full pathname. The file, or directory of files, can later be used as input to the pkgadd(1M) command. The following operands are supported: pkginst Specify the package instance, or list of instances for which request scripts will be created. The token all may be used to refer to all packages available on the source medium. 0 Successful completion. >0 An error occurred. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), pkgtrans(1), installf(1M), pkgadd(1M), pkgchk(1M), pkgrm(1M), removef(1M), admin(4),attributes(5) The -r option can be used to indicate a directory name as well as a filename. The directory name is used to create numerous response files, each sharing the name of the package with which it should be associated. This would be used, for example, when you will be adding multiple interactive packages with one invocation of pkgadd(1M). Each package would need a response file. To create multiple response files with the same name as the package instance, name the directory in which the files should be created and supply multiple instance names with the pkgask command. When installing the packages, you will be able to identify this directory to the pkgadd(1M) command. If the default admin file is too restrictive, the administration file may need to be modified to allow for total non-interaction during a package installation. Seeadmin(4) for details. 6 Apr 2005 pkgask(1M)
All times are GMT -4. The time now is 11:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy