I don't understand your need, please clarify.
But maybe this can help :
If you want to ignore the error message that are displayed, you can just add the redirection of the error output to the null file. example:
Regarding the dependencies, you can use "if/then/elif/else/fi" or "case $VAR in .../condition) ...;;/esac" block to manage the dependencies, also see || and && operator
How can I compare two decimal values within a function using Bash? Function fun2 isn't comparing the decimal values. Is there a way to do this using Bash or Korn?
#!/bin/bash
set -x
x=1
z=110
function fun1() { i=`bc << EOF 2>> /dev/null
scale=3
... (1 Reply)
New to scripting in general, so patience plz. If I ask a stupid question or don't get it, I thank you for your kindness in advance.
That said, did a for i loops checks to see if a PB* file is there but I need to know two things before I copy the file.
I need to know if the file's create date... (2 Replies)
Below is my shell script. I am trying to execute two different BTEQ scripts depending on the day of the week. So on a saturday I will execute a certain BTEQ script and on other weekdays I will run the other script.
#!/bin/ksh
dt=`date +"%a"`
if then
bteq > final_output <<- EOF
.run... (3 Replies)
Hi All,
I want to echo a message in case a system is reachable by ping or echo a different message in case it's not reachable.
Sample code i wrote is
ping localhost -n 2 | grep 'ttl' > ping_op; ls ping_op > /dev/null && drReachable=Alive; echo -e `date`: \\t "DR server is reachable" >>... (5 Replies)
Hi Guys!
Anybody know how can I use a nawk or awk on a script and printing the NAME, SECTION (must be 410 or 411 or 414) and TOTAL COST of CLASS 1 and 3 combined must be greater than 50. See below desired output file.
input.txt:
NAME,CLASS,COST,SECTION
JOHN,1,10,410
JOHN,2,20,410... (2 Replies)
Hi all,
I habe a file called test.log, which contain following data :
0.0
0.1
0.1
0.1
0.1
0.2
0.3
0.3
0.4
0.4
0.6
8.7
8.8
17.2
I want to show the data which gater than 9.0 But my script not working. (4 Replies)
Hi,
I have a list of files with different filenames like nam0001.txt,pan0001.txt etc coming in /data/inbox from various places.
I needed a shell script which would:-
1)searches for a word from the filenames (coming in inbox directory) provided in input parameter.
2)if found, put in... (2 Replies)
I have a unix shell script Test.sh
more Test.sh
echo "Calling dbquery1.sh...."
./dbquery1.sh
echo "Calling dbquery2.sh...."
./dbquery2.sh
more dbquery1.sh
sqlplus -s user1/password1@DB_SID @/tmp/storedprocedures/Hello.rcp
I run Test.sh
However, I do not want dbquery2.sh to be... (3 Replies)
Here's an interesting (to me, anyway) little puzzle.
Background:
I have a process that restores a number of large(ish) files from tape backup. As an individual file is being written, it is owned by root, then the ownership is changed when that file is complete. Since this process can take... (3 Replies)
In shell scripting, I can create a conditional statement based on the success or failure (exit status)of a command such as:
pinger()
{
ping -c 2 $remote_host >/dev/null 2>&1
ping_stat=$?
}
pinger
if ]; then
echo "blahblahblah"
exit 0
fi
how is this done using Python using... (3 Replies)