08-29-2012
Please remember to post what Operating System and version you are using and what Shell you prefer.
If you have standard answers to the questions, why not make a version of the install script which does not ask questions and run that version instead?
The long answer is to use the expect program if that is installed on your system.
Personally I would just make a custom version of the install script.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all...
I am executing a comman in a shell script but the command needs a user input of character 'y' as input so it stops in between...may i know is there is any way of giving that character as input in the shell script itself???...thanks in advance.... (6 Replies)
Discussion started by: santy
6 Replies
2. Shell Programming and Scripting
I am trying to extract two fields from the output of ifconfig command on one of my sun server . The output looks like :
root@e08k18:/tmp/test# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0:... (9 Replies)
Discussion started by: kpatel786
9 Replies
3. Solaris
Dear all,
i m unable to give array decalartion in solaris Operating system shell script
and script was so.sh
declare -a bull
for i in 1 2 3 4 5 6 7 8 9
do
bull=$i
echo "${bull}"
done
it is throwing an error called
so.sh: declare: not found
so.sh: bull=1: not... (20 Replies)
Discussion started by: naree
20 Replies
4. Shell Programming and Scripting
Hi,
Lets say I have a script "ss" which does this
read abc
echo $abc
read pqr
echo $pqr
Now if I want to pass and argument to only "abc" how do I do it.
If I do
echo "somevalue" | ss, it does not prompt for pqr and its value comes out as blank.
Any help is appreciated
Thanks
P (6 Replies)
Discussion started by: patjones
6 Replies
5. Shell Programming and Scripting
Hi,
I am using solari 10 OS which is having bash shell.
I need a shell script which takes user home directory and name of the file or directory as a input and based on that copy the files accordingly to the other directory.
example:I hava a machine1 which is having some files in a... (8 Replies)
Discussion started by: muraliinfy04
8 Replies
6. Shell Programming and Scripting
Hello to all,
Please some awk expert could help me.
If I want to run an awk script as "command" give it inputs externally I do:
Script.sh
Input="$1" # "$1" is the input that will be given to the script
Output=${Input%.*}.csv
awk '{$1=$1}1' $Input | awk '{...}' > $Output
and I run the... (3 Replies)
Discussion started by: Ophiuchus
3 Replies
7. UNIX for Dummies Questions & Answers
I have a unix command that prompts for 'y'. How do I run this from my shell script? (4 Replies)
Discussion started by: Sree10
4 Replies
8. Shell Programming and Scripting
Hello everybody,
I use `case' quite a lot but , excellent as it is , it only gives one
final result ; can anyone suggest a way whereas , say long
lists of choices are given and I , or a user could select either one
two or any number of results to be echoed .
many thanks in... (3 Replies)
Discussion started by: V686
3 Replies
9. Shell Programming and Scripting
Hi
I am trying to pass 2 input parameters from shell script to python API end point ,but not passing what i expected when print those inputs .Please advise
data.txt
" 7554317" ,xx5e1
" 7554317" ,xx96
" 7554317" ,xxd6
" 554317" ,xde
cat $sites/data.txt |sort |uniq >$sites/a.txt... (5 Replies)
Discussion started by: akil
5 Replies
10. UNIX for Beginners Questions & Answers
Here I am in a position to write a Unix Shell script(.sh) to remove MongoDB collection documents. I know how to remove based on a condition like below and it works for me.
eval 'db.Collection.remove({TimeStamp:{$lte: "'$var'"}})
But I need to change the remove statement based on a new parameter... (1 Reply)
Discussion started by: senthilmadhanT
1 Replies
LEARN ABOUT NETBSD
script
SCRIPT(1) BSD General Commands Manual SCRIPT(1)
NAME
script -- make typescript of terminal session
SYNOPSIS
script [-adfpqr] [-c command] [file]
DESCRIPTION
script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
Option:
-a Append the output to file or typescript, retaining the prior contents.
-c command
Run the named command instead of the shell. Useful for capturing the output of a program that behaves differently when associated
with a tty.
-d When playing back a session with the -p flag, don't sleep between records when playing back a timestamped session.
-f Flush output after each write. This is useful for watching the script output in real time.
-p Play back a session recorded with the -r flag in real time.
-q Be quiet, and don't output started and ended lines.
-r Record a session with input, output, and timestamping.
The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
ENVIRONMENT
The following environment variable is used by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO
csh(1) (for the history mechanism).
HISTORY
The script command appeared in 3.0BSD.
BUGS
script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
BSD
October 17, 2009 BSD