10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Folks -
I want to add error handling to a portion of a *.ksh, but I'm having difficulty doing so in an easily digestible way.
Essentially, I want to echo weather it was successful or unsuccessful after each command.
Here is the code I need to add error handling to:
perl... (2 Replies)
Discussion started by: SIMMS7400
2 Replies
2. Shell Programming and Scripting
I am working on a shell script where after making sftp connection to a remote server the file are being transferred. The problem is how to capture return code for the file which is missing at the remote location. I have tried to capture the return code which return value of "0" even the transfer of... (4 Replies)
Discussion started by: Khan28
4 Replies
3. Shell Programming and Scripting
HI All,
Whenever I write a shell script I always check if a command got executed successfully, even for the commands like cd, mv, rm and others, and even for the cases when there is ALMOST nothing to stop this commands from executing with success. so I am wondering if it is an overkill. I am... (1 Reply)
Discussion started by: rdogadin
1 Replies
4. 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
5. 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
6. Red Hat
Hi All,
I have a CentOS operating system installed. I work with really huge number of files which are not only huge in number but some of them really huge in size. Minimum number of files could be 1 million to 2 million in one directory itself. Some of the files are even several Gigabytes in... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
7. Shell Programming and Scripting
#!/bin/bash
while :
do
clear
echo ""***************************************"
echo "* - MAIN - MENU - *"
echo "***************************************"
echo "* 1. Directory Listing *"
echo "* 2. Users Currently Logged In *"
echo "* 3. Create a... (2 Replies)
Discussion started by: celtic123
2 Replies
8. Programming
I have some unstable mistake in my program and out-of-idea how to catch it.
I am looking for advice with a way to work it out!
I have in a pretty complicated program (but one source file) set of int-counters - 15, if exactly.
Lately, on final printout I have inpossible value (I am... (3 Replies)
Discussion started by: alex_5161
3 Replies
9. 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
10. Programming
hi everyone
i have a problem in design as follows:
there is a structured file ,for example ,
field 1, field 2 .......
--------------
--------------
i read it into my memory ,there are some change in the memory
maybe add some record or change one field in an existing record.
i am going... (1 Reply)
Discussion started by: benbenpig
1 Replies