in reply to Re: one liner in script
in thread one liner in script
Now for one of the commands I have to run it for only 4 secs. Now the only way I could come up with is like this : alarm() { /bin/perl -e 'alarm shift; exec @ARGV' "$@"; } ;alarm 4 'cmd 4 ' Now when I try to put that in a perl script between back tacs it doesnt work. This code doesnt work.$line=`cmd 1; cmd 2 ; cmd 3 .... cmd n `;
Is there anyway I can make the cmd 4 run for 4 secs only.$line=`cmd 1; cmd 2 ; cmd 3 ;alarm() { /bin/perl -e 'alarm shift; exec + @ARGV' "$@"; } ;alarm 4 'cmd 4 '.... cmd n `;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: one liner in script
by choroba (Cardinal) on Apr 12, 2010 at 15:41 UTC | |
by Anonymous Monk on Apr 12, 2010 at 16:56 UTC |