![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| perl for running ps -ef command | aju_kup | Shell Programming and Scripting | 1 | 06-04-2008 10:11 AM |
| [PERL] Running unix commands within Perl Scripts | userix | Shell Programming and Scripting | 1 | 05-28-2008 07:06 PM |
| Return value of piped command? | krishmaths | Shell Programming and Scripting | 5 | 03-23-2008 06:41 AM |
| Useful piped filter combinations? | Nelledawg | UNIX for Dummies Questions & Answers | 3 | 11-02-2007 04:28 PM |
| Perl running C code | gdboling | Shell Programming and Scripting | 1 | 09-02-2003 07:43 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
perl... how to tell if a piped command is still running?
I'm using the fabulous perl. I need a way to tell when a piped call to "open" has completed. Can I do this with a command like <ShellPipe> ??
Reason behind this: I'm trying to write a backup script in perl! This script will download a certain file from my web server, to my computer. Now, this perl script calls wget something like this: open( ShellPipe, "wget http://url.com" ); Is there some way to get wget to delete the file if the file download got interupted? Otherwise I'll have a partially downloaded backup! My script is smart enough, that it will try again if the file doesn't exist, you see. But what if the download got interupted? Then a file will exist, and I'll have a bad backup. I know it's unlikely to get interupted, but I like to take care and be very sure of these things ![]() Also, my webserver does not tell me the size of the file to be downloaded. It tells you when there is no more data, though. So for this reason, I just need to tell when the pipe has been completed. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|