10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello fellow UNIX gurus :)
I have a problem regarding the script below:
# Variables used in this shell.
power=0 # Stores squared integer
total=0 # Sum of all squared integers
num=0 # Stores command line arguements
# Provides error handling if command line... (5 Replies)
Discussion started by: Learn4Life
5 Replies
2. Shell Programming and Scripting
Below code works for different databases i.e. MYSQL and ORACLE
The problem is for MYSQL in Block: if ; $? taking value accordingly but in case of ORACLE $? is always taking this value as zero (0).
That is the reason in Oracle it always going in else Block in any case.. :(
and in case of ... (4 Replies)
Discussion started by: ambarginni
4 Replies
3. Shell Programming and Scripting
I need to run a cronjob and in the cronjob I execute a script that if there is an error produces standard error so I do
/RUNMYSCRIPT 2> mylogfile.log
However, if it runs correctly, I don't get a standard error output, I get a standard out output. How do I redirect both standard error and... (2 Replies)
Discussion started by: guessingo
2 Replies
4. Shell Programming and Scripting
Hello Friends,
Good Day.
I am trying to redirect a standard error to the bit bucket(/dev/null) but it is not working. Though, it is working fine in redirecting the standard output.
Below is the output of my script without any redirection:
$ ./CheckVSSLocks.sh... (16 Replies)
Discussion started by: singh.chandan18
16 Replies
5. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
6. Shell Programming and Scripting
Helo Experts,
I need a help in handling errors in shell script, wants my errors displayed in text file instead of command window..
My shell script is here;
cd /cygdrive/s/Files
for FILES in ./*.*
do
temp=`basename $FILES`
if cp $FILES /cygdrive/r/CopyFile1/$FILES; then
echo "copy... (5 Replies)
Discussion started by: CelvinSaran
5 Replies
7. Shell Programming and Scripting
Hi,
I want to redirect the standard output to standard error whenever an error occurs for ex
if
then
echo right
else
echo wrong
fi
I want to redirect the wrong to stderror .Adding a line 1>&2 will do that or is additional code to be added.How can i verify whether the output... (2 Replies)
Discussion started by: padmisri
2 Replies
8. Shell Programming and Scripting
Hi there
how can i get the result of a command to not give me its error. For example, on certain systems the 'zfs' command below is not available, but this is fine becaues I am testing against $? so i dont want to see the message " command not found" Ive tried outputting to /dev/null 2>&1 to no... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
9. UNIX for Dummies Questions & Answers
Hi.
I'm working on a project for a class, and there's one part of the project that is confusing me.
It's a compression and decompression project, and after we write our code for compression, we need to write to standard error.
(1) Size of original file (number of characters read... (1 Reply)
Discussion started by: sjung10
1 Replies
10. UNIX for Dummies Questions & Answers
Hey guys, need some help. Running AIX Version 5.2 and one of our cron jobs is writing errors to a log file. Any ideas on the following error message.
Error: Internal system error: Unable to initialize standard output file
I'm guessing more info might be needed, so let me know.
Thanks (2 Replies)
Discussion started by: firkus
2 Replies