![]() |
|
|
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 |
| rcp error trapping in rsh | vvejendla | Shell Programming and Scripting | 2 | 11-21-2005 11:29 PM |
| trapping errors while using FTP. | radhika | Shell Programming and Scripting | 5 | 05-27-2005 08:55 AM |
| Error Trapping | kev112 | Shell Programming and Scripting | 6 | 05-25-2005 02:37 AM |
| ftp error trapping | dhawkjrscripter | UNIX for Dummies Questions & Answers | 1 | 04-15-2005 05:58 PM |
| ftp error trapping | Bab00shka | UNIX for Dummies Questions & Answers | 1 | 04-02-2002 12:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Trapping $! output
hey all,
I have a script that creates and then distributes html files via scp on a 60 second cycle. On occasions the scp will hang and not complete with the cycle. When running the scp command in the back ground it returns the PID. How do I trap $! in the script? Code:
job=`echo $!` returns an error. -bash-3.00$ job=`echo $!` -bash: !`: event not found What I want to be able to do is monitor how long the scp runs for, if it is still running 2 minutes after starting then it is hung (can't just ps for the scp command as the scp script is used by multiple applications). Any ideas? Cheers, Neil |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|