10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I am trying the following in my bash script which logs into my machine and runs a command. Trying to solve this using expect.
The first expect statement is hit and it enters the address "10.10.0.10" but when the second expect statement is hit it exits
#!/bin/bash
expect -c '
spawn... (2 Replies)
Discussion started by: skorada
2 Replies
2. Programming
hi all,
i have made a shell script and it runs until it reaches the if statement, doesn't the ! mean only if the command fails it will echo me that message and then exit
can anyone please help me what is wrong with my code?
many thanks,
rob
#!/bin/bash
echo "is this archive... (10 Replies)
Discussion started by: robertkwild
10 Replies
3. Shell Programming and Scripting
All,
I have a set of files in the Source , e-g
Afile.DAT
Bfile.DAT
Cfile.DAT
....
AAfile.DAT ...etc
I will know for sure the list of file name before I copy the same from the Source area
Before I copy the files to Target , I need to make sure that I have received all the files... (5 Replies)
Discussion started by: Shanks
5 Replies
4. Shell Programming and Scripting
Hi,
As per my understanding, we can use two shebang statements in a single shell script. Please see below snippet-
#!/bin/bash
.......## some code A
#!/bin/csh
.......## some code B
exit 0;
Here, code A will be executed using bash shell and code B will be executed with c shell.
... (9 Replies)
Discussion started by: tarunmudgal4u
9 Replies
5. Shell Programming and Scripting
Hello members,
I'm working on the Solaris environment and the DB i'm using is Oracle 10g.
Skeleton of what I'm attempting;
Write a ksh script to perform the following. I have no idea how to include my sql query within a shell script and loop through the statements. Have therefore given a... (4 Replies)
Discussion started by: novice82
4 Replies
6. Shell Programming and Scripting
Hi
I've only been using Unix for a few weeks but am really impressed with its capabilities and ease of use.
I am, however, struggling with a shell script at the moment.
I would like automated reports on Disk Usage and available free space. I've written a straight forward script that... (0 Replies)
Discussion started by: huskie69
0 Replies
7. UNIX and Linux Applications
hi experts
please help me to compare two files which are in different directory
file1<file will be master file>
(/home/rev/mas.txt}
ex x1
x2
file2 <will be in different folder>
(/home/rev/per/.....)
ex x3
x4
the filesinside per folder i need to compare with master file... (1 Reply)
Discussion started by: revenna
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
I need to check that if user is not oracle the the script should exit out .
But the below script always exits evenif I am logged as oracle.
Plz help me...........
USER=`id`
echo $USER
if ; then
echo " You are logged as `id` , it must be oracle "
exit 2
fi
Regards (2 Replies)
Discussion started by: reply2soumya
2 Replies
9. Shell Programming and Scripting
I have a shell script which resides on three SCO machines containing some simple sqlplus statments. I need to run these scripts remotely. Currently, I am trying to use rsh to do so:
rsh hostname myscript args
The problem is that the arguments to the sqlplus statements in the remote shell... (4 Replies)
Discussion started by: Madbreaks
4 Replies
10. Shell Programming and Scripting
hi
I face the problem the if else statement dint return correct result for me
my script as below:
#!/bin/ksh
sqlplus -s /nolog <<EOF
connect databaseuser/password
column num new_value num format 9999
set head off
select count(*) num from table1;
exit num
EOF
if ; then
echo "$?"... (6 Replies)
Discussion started by: jaseloh
6 Replies