Thank you all for the quick responses. I'm going to be working on this later this afternoon and I'll see what I end up with, if wanted I'll share my code when finished.
D
btw, I just put your code into a script, with the #!/bin/sh disclaimer... I'm just trying to run the code and see how it works, but it doesn't seem to run.
Thanks....
Here it is:
[bcdb/sysadmin/home/dwayne/scripts] ./test.sh
usage=0
time_limit=3
+ echo % h
% h
+ sed -n s/.*\([0-9]\+\)%.*\([0-9][0-9]\):[0-9][0-9]:[0-9][0-9].*/\1
+ \2/;T;p out.txt [[ -gt 0 ]]
./test.sh: [[: not found
+ [[ -gt 3 ]]
./test.sh: [[: not found
Unrecognized command: s/.*\([0-9]\+\)%.*\([0-9][0-9]\):[0-9][0-9]:[0-9][0-9].*/\1 \2/;T;p
I'm trying to modify a sh script so not sure I can do this with your code. I'm trying to just insert some code into an existing bourne shell script.
I'll try ghostdog's code to see if it'll work.... unless you can help me with getting your code into .sh format. thanks!