The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ftp code in Perl Raynon Shell Programming and Scripting 21 09-11-2008 04:44 AM
need help to write perl code getdpg Shell Programming and Scripting 0 09-20-2006 10:24 AM
perl code help circleW UNIX for Dummies Questions & Answers 1 11-09-2004 05:28 PM
Perl running C code gdboling Shell Programming and Scripting 1 09-02-2003 07:43 PM
Perl Code Hiding sskb Shell Programming and Scripting 5 01-02-2002 02:21 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-05-2008
talashil talashil is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 61
PERL Code

I have a code block ...

$cmd = "find $audit_dir -mtime +$days_to_keep -exec rm {} \\;";

unless(open(CMD, "$cmd |")){
$msg = "Error command : $cmd \n\n";
print_log $lgh,"$msg",1;
exit 1;
}

print_log $lgh, "Deleting physical files with Command : $cmd ", 1 if verbose;

while ($line=<CMD>) {
print_log $lgh, "Physical files older than $days_to_keep deleted from $audit_dir", 1 if $verbose;
}


after it executes the print_log , it's not going inside the while loop ..

what am I missing here ?

Thanks
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0