i have a very big script i have that i'd like to add a timeout to.
this script runs on a several remote host. i update this script with timeout clause and then copy it over to all the hosts on which it is currently on.
basically, i want the timeout to make the script abort/exit if it's running time is beyond a predeffined time.
this is a script written in bash.
i'm hoping something like this is possible.
#!/bin/bash
timeout 60seconds () {
.......
........
.........
........
.........
.......
.......
}
if [ timeout -ge 60 ]
exit
fi