10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
OS version: RHEL 7.4
Shell : bash
I would like to capture command outputs using tee like # yum upgrade | tee yumupgradeLog
But, if I use tee command, I cannot respond to prompts like Is this ok : during command execution as shown below.
Is there a way I could use tee and still be able to... (4 Replies)
Discussion started by: kraljic
4 Replies
2. Shell Programming and Scripting
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
7 Replies
3. Shell Programming and Scripting
i have a script which takes input from user, if user gives either Y/y then it should continue, else it should quit by displaying user cancelled.
#!/bin/sh
echo " Enter your choice to continue y/Y OR n/N to quit "
read A
if
then
echo " user requested to continue "
##some commands... (7 Replies)
Discussion started by: only4satish
7 Replies
4. Shell Programming and Scripting
Hi, I'm writing a script,
in the script I need to use tcpdump to capture some packets
however it needs root priviledge
my computer is configured by school and I have no real root priviledge
so I can't use sudo on my computer,like
Code:
sudo tcpdump ......
I have to use a limited... (1 Reply)
Discussion started by: esolve
1 Replies
5. Shell Programming and Scripting
Hi,
echo "Enter file name of input file list along with absolute path : "
read inputFileList
if
then
for string in `cat inputFileList`
do
echo $string
done
else
echo " file does not exist"
fi
From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
1 Replies
6. Shell Programming and Scripting
The script prompts the user to enter four lines. (1 Reply)
Discussion started by: polineni
1 Replies
7. Solaris
I am trying to script a non interactive installation of OpenSSL 1.0.0e on Solaris 10 SPARC which I downloaded from Sun Freeware for Solaris 10 (I am not allowed to post URLS). When I try to create a pkgask response file, I keep getting the following error
When I get the error, I perform the... (0 Replies)
Discussion started by: dafinga
0 Replies
8. Shell Programming and Scripting
Hi
I have a question that after trying tirelessly I cant solve. I'm not great wth UNIX and wonder if anyone could help. I have to create a shell program using functions that prompts for a user ID. I must then verify that the user Id corresponds to an account on the system. If a legal user Id is... (16 Replies)
Discussion started by: mmg2711
16 Replies
9. UNIX for Dummies Questions & Answers
Hi
I have a question that after trying tirelessly I cant solve. I'm not great wth UNIX and wonder if anyone could help. I have to create a shell program using functions that prompts for a user ID. I must then verify that the user Id corresponds to an account on the system. If a legal user Id is... (1 Reply)
Discussion started by: mmg2711
1 Replies
10. Shell Programming and Scripting
Hi!
I want to write a script that will create an archive (via tar) that will restrict the size of the tar file. The size can be constrained using the keyword 'k' and providing the size restriction. The problem is that the script needs to know (detect) when the tar command prompts the user (which... (2 Replies)
Discussion started by: mitch8
2 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)