10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am analyzing one of the scripts written by another person.script is having multiple if conditions and everything are nested.The code is not formatted properly.Is there any way to identify in Unix to identify begin and end of a particular if block? (6 Replies)
Discussion started by: vamsi.valiveti
6 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to place one SQL query in Shell Script with Where Condition as Status='1' But after running the the script it is returning error as
SQL0206N "1" is not valid in the context where it is used. SQLSTATE=42703
The query is working fine in Data Base.
Please suggest... (1 Reply)
Discussion started by: sumanmca2006
1 Replies
3. UNIX for Dummies Questions & Answers
Hi Guys,
I am new to shell script.I need your help to write a shell script.
I need to write a shell script to extract data from a .csv file where columns are ',' separated.
The file has 5 columns having values say column 1,column 2.....column 5 as below along with their valuesm.... (1 Reply)
Discussion started by: Vivekit82
1 Replies
4. Shell Programming and Scripting
I have written this script. This is used for creating a backup folder.
#!/bin/sh
#set -x
. /home/.profile
usage="Usage is $0"
usage="$usage "
# Use the getopt utility to set up the command line flags.
set -- `/usr/bin/getopt b: $*`
# Process individual command line arguments
while ;... (1 Reply)
Discussion started by: arijitsaha
1 Replies
5. Shell Programming and Scripting
I am needing to include some if statements within an expect script. These will need to have two conditions under an AND join. Upon a successful IF condition I want to set multiple variables.
I have tried a lot of variations of the below statement with no success. I have also searched the WEB... (2 Replies)
Discussion started by: Slagathor
2 Replies
6. Shell Programming and Scripting
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)
Discussion started by: tapia
3 Replies
7. Shell Programming and Scripting
Hi All,
I am new to shell scripting.
Can any one say what is wrong in this if statement, that uses multiple conditions
if
then
***************
else
if ( -z $pcs && "$night_time_calc" > "$night_time" )
then
********************************
... (4 Replies)
Discussion started by: ssenthilkumar
4 Replies
8. Shell Programming and Scripting
if -o ]
then
echo "Expected valid value"
The above multiple if condition is NOT working in my script.
I am getting the error as '-a' not expected. Can anyone help with the syntax for this? (5 Replies)
Discussion started by: dinesh1985
5 Replies
9. Shell Programming and Scripting
Guys, Im trying to have a script that evaluates multiple conditions :
test.sh:
if
then
echo "host $1"
else
if
then
echo "host $1"
else
echo $1 not valid
exit 1
fi
when I do
./test.sh brazil1
I get: (4 Replies)
Discussion started by: bashshadow1979
4 Replies
10. Shell Programming and Scripting
Hi,
I need to check whether one file has EOF or not.
There's one daemon in our system, which will pick the files FTPed to us. However, sometimes the daemon picks the file before FTP is finished.
So I'm planning to add some checking of EOF on the FTPed files in the shell script.
Could... (8 Replies)
Discussion started by: ideazhcy
8 Replies