Sponsored Content
Top Forums Shell Programming and Scripting Intermittent "cp: cannot stat" error with nested loop Post 302656179 by methyl on Thursday 14th of June 2012 10:30:05 AM
Old 06-14-2012
Might be here:
Code:
RETRY="$DIR/${MGR_ID}_${RETRY}_${SUBJECT}.msg"
cp -p $FILE $RETRY

On the right hand side of the assignment to RETRY, you have ${RETRY}. Perhaps this should be just the string RETRY? The more times the assignment executes the longer and more garbled the value of ${RETRY} becomes.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Intermittent "slowdowns" on Solaris 2.6

We have a Sun Enterprise 450 running Solaris 2.6 that is giving us intermittent performance issues. These problems happen several times a day, usually lasting for a few minutes each time. sar shows that when this occurs, CPU idle time is 0% or close to it, and sys and wio are both high. iostat... (3 Replies)
Discussion started by: fiam
3 Replies

2. Shell Programming and Scripting

Avoid "++ requires lvalue" Error in Loop Calculation

Hi All, Please help me to perform sum of values in a loop, I am getting following error: "total=0++432907765772: ++ requires lvalue" where actual statement is as : total=$total+$amt where amt can have +ve or -ve values Thanks Sandeepb (3 Replies)
Discussion started by: sandeepb
3 Replies

3. UNIX for Dummies Questions & Answers

what is a "find stat() error"

I'm searching for an oracle emtab file. I do a find / -name emtab -print and the first result gives me find: stat() error /apps/tomcat/jakarta-tomcat-5.5.9/bin/console.txt: I/O error Can someone explain what this error means? thanks, (2 Replies)
Discussion started by: orahi001
2 Replies

4. Solaris

How to resolve error "INIT: Cannot stat /etc/inittab, errno: 2"

Hi All, I am getting an error message when I execute command “zlogin -C sunsrv4z5” on my root server. INIT: Cannot stat /etc/inittab, errno: 2 INIT: Cannot stat /etc/inittab, errno: 2 As per my analysis it seems that some files inside /etc folder are deleted. This server was... (14 Replies)
Discussion started by: surbhit4u
14 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Ignoring mv commands "cannot stat" error ?

So, my third thread here ^^ and still asking questions. Thanks for you patience and help, I really appreciated it ;) I currently use a shell script to move folders of songs from one to another location on my harddrive. I use something like this: sudo mv /var/mobile/Media/"My Music"/"Vasco... (3 Replies)
Discussion started by: pasc
3 Replies

7. Shell Programming and Scripting

Bash (Ubuntu server): Syntax error: "|" unexpected in While-loop

Hello forum, I hope my problem is easy to solve for someone in here! My main task is to copy a large amount of imap-accounts from one server to another. There is a tool (Perl) called imapsync which does the job exellent. Unfortunately I'm only able to run it on one account at a time. After... (3 Replies)
Discussion started by: primaxx
3 Replies

8. AIX

Equalent of Linux "stat" in AIX

i would like to know the equivalent of stat -c %Y <file> command in AIX. i tried "istat" but its not giving the epoch time and also tried with perl perl -le'printf "%o", 07777 & (stat) for @ARGV' <file> it not also provding the timing . ... (3 Replies)
Discussion started by: expert
3 Replies

9. UNIX for Dummies Questions & Answers

Is "stat: illegal option -- -" an issue with hyphenated filename or flag problem?

Hi. I'm trying to install VMWare Workstation to run a virtual machine on my Mac OS, but running the bundle from bash(xterm) sh VMware-workstation-Full-11.0.0-2305329.x86_64.bundle (as suggested in install guide) comes up with error:stat: illegal option -- - usage: stat Digging... (5 Replies)
Discussion started by: defeated
5 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
install::TempContent::Objects::mod_perl-2.0.9::docs::apiUserRContributed Pinstall::TempContent::Objects::mod_perl-2.0.9::docs::api::APR::Status(3)

NAME
APR::Status - Perl Interface to the APR_STATUS_IS_* macros Synopsis use APR::Status (); eval { $obj->mp_method() }; if ($@ && $ref $@ eq 'APR::Error' && APR::Status::is_EAGAIN($@)) { # APR_STATUS_IS_EAGAIN(s) of apr_errno.h is satisfied } Description An interface to apr_errno.h composite error codes. As discussed in the "APR::Error" manpage, it is possible to handle APR/Apache/mod_perl exceptions in the following way: eval { $obj->mp_method() }; if ($@ && $ref $@ eq 'APR::Error' && $@ == $some_code) warn "handled exception: $@"; } However, in cases where $some_code is an APR::Const constant, there may be more than one condition satisfying the intent of this exception. For this purpose the APR C library provides in apr_errno.h a series of macros, "APR_STATUS_IS_*", which are the recommended way to check for such conditions. For example, the "APR_STATUS_IS_EAGAIN" macro is defined as #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN || (s) == APR_OS_START_SYSERR + ERROR_NO_DATA || (s) == APR_OS_START_SYSERR + SOCEWOULDBLOCK || (s) == APR_OS_START_SYSERR + ERROR_LOCK_VIOLATION) The purpose of "APR::Status" is to provide functions corresponding to these macros. Functions "is_EACCES" Check if the error is matching "EACCES" and its variants (corresponds to the "APR_STATUS_IS_EACCES" macro). $status = APR::Status::is_EACCES($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 An example of using "is_EACCES" is when reading the contents of a file where access may be forbidden: eval { $obj->slurp_filename(0) }; if ($@) { return Apache2::Const::FORBIDDEN if ref $@ eq 'APR::Error' && APR::Status::is_EACCES($@); die $@; } Due to possible variants in conditions matching "EACCES", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::EACCES" directly. "is_EAGAIN" Check if the error is matching "EAGAIN" and its variants (corresponds to the "APR_STATUS_IS_EAGAIN" macro). $status = APR::Status::is_EAGAIN($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 For example, here is how you may want to handle socket read exceptions and do retries: use APR::Status (); # .... my $tries = 0; my $buffer; RETRY: my $rlen = eval { $socket->recv($buffer, SIZE) }; if ($@ && ref($@) && APR::Status::is_EAGAIN($@)) { if ($tries++ < 3) { goto RETRY; } else { # do something else } } else { die "eval block has failed: $@"; } Notice that just checking against "APR::Const::EAGAIN" may work on some Unices, but then it will certainly break on win32. Thefore make sure to use this macro and not "APR::Const::EAGAIN" unless you know what you are doing. "is_ENOENT" Check if the error is matching "ENOENT" and its variants (corresponds to the "APR_STATUS_IS_ENOENT" macro). $status = APR::Status::is_ENOENT($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 An example of using "is_ENOENT" is when reading the contents of a file which may not exist: eval { $obj->slurp_filename(0) }; if ($@) { return Apache2::Const::NOT_FOUND if ref $@ eq 'APR::Error' && APR::Status::is_ENOENT($@); die $@; } Due to possible variants in conditions matching "ENOENT", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::ENOENT" directly. "is_EOF" Check if the error is matching "EOF" and its variants (corresponds to the "APR_STATUS_IS_EOF" macro). $status = APR::Status::is_EOF($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "EOF", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::EOF" directly. "is_ECONNABORTED" Check if the error is matching "ECONNABORTED" and its variants (corresponds to the "APR_STATUS_IS_ECONNABORTED" macro). $status = APR::Status::is_ECONNABORTED($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "ECONNABORTED", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::ECONNABORTED" directly. "is_ECONNRESET" Check if the error is matching "ECONNRESET" and its variants (corresponds to the "APR_STATUS_IS_ECONNRESET" macro). $status = APR::Status::is_ECONNRESET($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "ECONNRESET", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::ECONNRESET" directly. "is_TIMEUP" Check if the error is matching "TIMEUP" and its variants (corresponds to the "APR_STATUS_IS_TIMEUP" macro). $status = APR::Status::is_TIMEUP($error_code); arg1: $error_code (integer or "APR::Error object" ) The error code or to check, normally $@ blessed into "APR::Error object". ret: $status ( boolean ) since: 2.0.00 Due to possible variants in conditions matching "TIMEUP", the use of this function is recommended for checking error codes against this value, rather than just using "APR::Const::TIMEUP" directly. See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.18.2 2015-0install::TempContent::Objects::mod_perl-2.0.9::docs::api::APR::Status(3)
All times are GMT -4. The time now is 09:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy