Sponsored Content
Top Forums Shell Programming and Scripting Question on error from script Post 302264985 by BigSky on Friday 5th of December 2008 09:25:33 AM
Old 12-05-2008
Code:
  #if fs > threshold find files to move to different  filesystem
 if [[ $UsedSpace_u06 -gt $Threshold_u06 ]]
 then
  
         find $LOG_path -name "FS_*.log" -mtime +4 -exec rm  '{}' +
         echo "" >> $LOG_path/FS_`date  +%Y%m%d`.log
         echo "Files to be copied to XXXX..." >>  $LOG_path/FS_`date +%Y%m%d`.log
         find $u06_path -name "e*${u06_dmp_file}.dmp.gz"  >> $LOG_path/FS_`date +%Y%m%d`.log \;
         find $u06_path -name "${u06_dmp_file}" >>  $LOG_path/FS_`date +%Y%m%d`.log \;
         find $u06_path -name "e*${u06_dmp_file}.dmp.gz" |  while read file              #while loop to parse list
         

                 do
                         scp -rp $file  $RemoteServer
                         if [[ $? -ne 0 ]]
                         then
                                 echo "" >>  $LOG_path/FS_`date +%Y%m%d`.log
                                 echo "SCP exit status is"  "$?" >> $LOG_path/FS_`date +%Y%m%d`.log
                                 echo "SCP Failed" >>  $LOG_path/FS_`date +%Y%m%d`.log
                                 echo "" >>  $LOG_path/FS_`date +%Y%m%d`.log
                         else
                                 rm $file
                                 echo "SCP exit status is"  "$?" >> $LOG_path/FS_`date +%Y%m%d`.log
                                 echo "SCP Passed for " $file  >> $LOG_path/FS_`date +%Y%m%d`.log
                         fi
                 done
 fi
 find: bad option ;
 find: path-list predicate-list
 find: bad option ;
 find: path-list predicate-list

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error Question

Every night I recieve this message: Verify Report - Broken/missing symbolic links File With Discrepancies : 213 Total Discrepancies : 213 Can anyone explain what this is and how I can resolve it? Thanks, DJ At Work (4 Replies)
Discussion started by: djatwork
4 Replies

2. UNIX for Advanced & Expert Users

Question about error

While attempting to use ftp to retrieve a file from a remote server (running SCO Unix 5.0.2), it eventually returns a timeout error with the following message - netin: connection reset by peer. I can't find any reference to this error. Has anyone encountered it before, or know what causes it? (3 Replies)
Discussion started by: Howeird
3 Replies

3. Shell Programming and Scripting

Question about error reporting

hi all, i've got a script that takes in what a user enters (multiple entries) and then joins them all together and appends this to a file. what i want to happen now is the terminal should display "record saved" if the save to the file is successful, if it isn't just display the standard unix... (2 Replies)
Discussion started by: wazzag
2 Replies

4. Shell Programming and Scripting

Newb scripting question, I get the error script not found

This is probably a really simple problem, but goes easy on me I'm still a newb. The problem I have is that a script (we'll call it script.script) I edited won't run for some reason, I get the error "ksh: script.script: not found" The location of my script is as follows: /home/users/arkitech ... (3 Replies)
Discussion started by: Arkitech
3 Replies

5. Programming

C Question compilation error

What does the following mean: state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", . . . }; extern state_field state_abvr; issues we I am facing following compilation issue bosdf9d1:root make CC -I/bto/bcs/shared/include -I/bto/sys/BCS/usr/include ... (1 Reply)
Discussion started by: jaganreddy
1 Replies

6. Filesystems, Disks and Memory

Question - error during boot

I have an HP NetServer LH3 which is exhibiting an error during the boot process. I am getting the following messages, none of which I've seen before 1. WARNING: SCSI adapter: Cannot install intr vecno=12 type=4 IPL=5 Vector 12 is private 2. WARNING: "TEST_UNIT_READY" Command timed 11 seconds... (0 Replies)
Discussion started by: slant-40
0 Replies

7. Programming

Newbie Question.. -> error: syntax error before ';' token

Hello, the following is generating a error at the line "tmprintf(&tmBundle, _TMC("{0}"),Prompt);"... a bit lost as I am diving into this debug... Thank you in advance... int H_YesNo(TMCHAR *Prompt, int DefVal) { TMCHAR YesNo = '\0'; tmprintf(&tmBundle, _TMC("{0}"),Prompt); while... (3 Replies)
Discussion started by: reelflytime
3 Replies

8. Shell Programming and Scripting

Error redirection question

Hi gurus, I have a question, need some of your inputs... I have a command like this : export LINE_COUNT=`wc -l test.dat | awk '{print $1}'` echo $LINE_COUNT --- > gives me 2 which is fine as the file has 2 lines. This works fine if the file test.dat is present but in case... (3 Replies)
Discussion started by: calredd
3 Replies

9. Shell Programming and Scripting

Question about syntax error

first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe s = `expr ls -s Documents | grep Music | awk '{ print $1 }' ` t = `expr $t + $s` it give syntax error s not found t not found lol... any idea why? (7 Replies)
Discussion started by: Nick1097
7 Replies

10. AIX

Question about Error Report script

Hi i need to understand what "errpt -s 0328000014" will do in script. will this only capture data for 28th march at 00:00 hrs. if issue happen it is ok else nothing or for 28th march and onwords it will run and and check every day at 00:00 hrs for issue to occur below is the snippet... (1 Reply)
Discussion started by: scriptor
1 Replies
catch(n)						       Tcl Built-In Commands							  catch(n)

__________________________________________________________________________________________________________________________________________________

NAME
catch - Evaluate script and trap exceptional returns SYNOPSIS
catch script ?varName? _________________________________________________________________ DESCRIPTION
The catch command may be used to prevent errors from aborting command interpretation. Catch calls the Tcl interpreter recursively to exe- cute script, and always returns without raising an error, regardless of any errors that might occur while executing script. If script raises an error, catch will return a non-zero integer value corresponding to one of the exceptional return codes (see tcl.h for the definitions of code values). If the varName argument is given, then the variable it names is set to the error message from interpret- ing script. If script does not raise an error, catch will return 0 (TCL_OK) and set the variable to the value returned from script. Note that catch catches all exceptions, including those generated by break and continue as well as errors. The only errors that are not caught are syntax errors found when the script is compiled. This is because the catch command only catches errors during runtime. When the catch statement is compiled, the script is compiled as well and any syntax errors will generate a Tcl error. EXAMPLES
The catch command may be used in an if to branch based on the success of a script. if { [catch {open $someFile w} fid] } { puts stderr "Could not open $someFile for writing $fid" exit 1 } The catch command will not catch compiled syntax errors. The first time proc foo is called, the body will be compiled and a Tcl error will be generated. proc foo {} { catch {expr {1 +- }} } SEE ALSO
error(n), break(n), continue(n) KEYWORDS
catch, error Tcl 8.0 catch(n)
All times are GMT -4. The time now is 02:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy