I have a shell script to install one of our products. It comprises of commands that are specific to the product installation. These commands require user inputs at different stages.
To avoid manual feeding of inputs every time, I tried using HERE document.
it is like-
HERE is working perfectly fine for all the commands except one. In that, moment it reaches to a particular option, instead of taking the input from HERE, it simply skips rest of the options and proceeds further without any error.
I tried capturing the output and errors, however, since, it is not resulting in any error at that stage, it is not capturing anything.
Can anyone please help me in how to troubleshoot it? Or, any other workaround?
Thanks,
Nishant
Moderator's Comments:
Please use code tags as required by forum rules!
Last edited by RudiC; 05-09-2016 at 06:35 AM..
Reason: Added code tags.
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)
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?... (1 Reply)
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)
Hi folks
I m creating script which is give me below error.
$ ./function.ksh
./function.ksh: here document `EOF' unclosed
Inside the script is
#!/bin/ksh
export ORACLE_SID=OECDV1
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export PATH=$ORACLE_HOME/bin:$PATH
echo "sql is... (3 Replies)
Hi,
I have xml documents that I want to change a value in, I can do it using sed in a text document but not the xml document. I have read other posts that allow the change between tags but the part I wish to change is only a small part of data with the tags.
e.g.
<?xml version="1.0"... (2 Replies)
Hi
I am unable to spot a error with my here document in the shell script.
for sid in $sids
do
ORACLE_SID=sid
ORACLE_HOME=$(grep $sid $ORATAB_LOC |cut -f2 -d':')
$ORACLE_HOME/bin/sqlplus -s /nolog <<EOF
@$HOME/sql/checkdb-status.sql
EOF
done
I am getting the error... (8 Replies)
Over the past 4 -5 years, I have cobbled together a rudimentary 'Document Management System' for a school district I support using Linux Bash Shell scripts..
The purpose of the scripting was to supplement features of a Job Applicant Center that had very simplistic methods of handle file... (1 Reply)
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)
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)