09-20-2008
option 1 should work and is preferred.
can you replace your mail line with a simple echo to see if the problem is not with your mail statement?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I know that this is a ridiculously simple statement, but I am getting an error when I execute it, and I can't figure out what it is. Can anyone point me in the right direction?
#!/bin/ksh
integer dateMonth=0
integer intZero=0
if
then
dateMonth = 1
fi
echo $dateMonth (7 Replies)
Discussion started by: mharley
7 Replies
2. Shell Programming and Scripting
I'm having an issue running multiple commands in a case statement. If i only run one command it works fine. Am I supposed to use double semi-colons after each statement or do i not need any at all?
here is a snippet of the code:
case `uname` in
"Linux")
echo This is linux.
cat... (1 Reply)
Discussion started by: kuliksco
1 Replies
3. Shell Programming and Scripting
Hello,
I am trying to create a simple script that will check the disk usage of a drive, and if it is over the limit it will delete the oldest ten files. everything is working except for when i implement the if statement i get the error
/usb0: zero divisor.
I am pretty sure that the du -k... (1 Reply)
Discussion started by: bpage
1 Replies
4. Shell Programming and Scripting
Hi there,
Im new in the scripting world and ran into trouble yesterday. I want to make a small script that runs in crontab checking folders. If the folder size is greater than 10 (or what I set the variable to) then send a mail with a warning.
#!/bin/sh
set -x
A=8
C=`du -skh... (7 Replies)
Discussion started by: ntenz
7 Replies
5. Shell Programming and Scripting
Hi guys,
I'm typing the following command, but I'm getting a different output than expected.
for file in *20*
do
ls -l $file | wc -l
done
Instead of listing a total count of the files, it seems to be counting each file and then printing the number of the file - which is 1. How... (7 Replies)
Discussion started by: bbbngowc
7 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have never actually created a bash script but thought I would give it a try and got hung up fast.(stupid noob). In the script I have parsed a xml file to get a bunch of file prefixs out. I am then going to check a folder to determine if a file with the correct prefix exists.
All the... (5 Replies)
Discussion started by: Dallasbr
5 Replies
7. Shell Programming and Scripting
if ]; then
echo "successssssssssssssssssss"
$filename = "<font color='red'>$i</font>"
else
echo "failureeeeeeeeeeeeeeeeeeeee"
$filename = "$i"
fi;
I'm just trying to see is this - read a file name and highlight... (2 Replies)
Discussion started by: vmanda
2 Replies
8. Shell Programming and Scripting
So I'm writing a script that takes in arguments given from the shell. The last argument I'm using as a tag to tell my script, via if statements, to do one thing or another. A sample input would be:
script.scr infile.txt outfile.txt F
The "F" at the end there I expect to be one of two tags... (3 Replies)
Discussion started by: Malavin
3 Replies
9. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
10. Shell Programming and Scripting
Hi all,
I thought this would be simple, but I've been having a lot of trouble trying to write this IF statement, if I may ask for help pls:
In BASH, how would I construct the if statement:
Should ONLY be true if USEROPTscript=="yes"]] AND $mode=="INSTALL" /or/ $mode=="CHANGE" ]]... (3 Replies)
Discussion started by: jmccoughlin
3 Replies
LEARN ABOUT LINUX
execute
EXECUTE(7) SQL Commands EXECUTE(7)
NAME
EXECUTE - execute a prepared statement
SYNOPSIS
EXECUTE name [ ( parameter [, ...] ) ]
DESCRIPTION
EXECUTE is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the pre-
pared statement must have been created by a PREPARE statement executed earlier in the current session.
If the PREPARE statement that created the statement specified some parameters, a compatible set of parameters must be passed to the EXECUTE
statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of
their parameters; the name of a prepared statement must be unique within a database session.
For more information on the creation and usage of prepared statements, see PREPARE [prepare(7)].
PARAMETERS
name The name of the prepared statement to execute.
parameter
The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the
data type of this parameter, as was determined when the prepared statement was created.
OUTPUTS
The command tag returned by EXECUTE is that of the prepared statement, and not EXECUTE.
EXAMPLES
Examples are given in the Examples [prepare(7)] section of the PREPARE [prepare(7)] documentation.
COMPATIBILITY
The SQL standard includes an EXECUTE statement, but it is only for use in embedded SQL. This version of the EXECUTE statement also uses a
somewhat different syntax.
SEE ALSO
DEALLOCATE [deallocate(7)], PREPARE [prepare(7)]
SQL - Language Statements 2010-05-14 EXECUTE(7)