Timing file editor
timesrt.sh is bash script to edit large timing values
in bsdutils/util-linux's 'script' timing files. Please read the script for
N_LINES=500 TIME_OFFSET=10 THRESHOLD=300 ./timesrt.sh testfile
N_LINES=20 TIME_OFFSET=0 THRESHOLD=60 ./timesrt.sh testfile
The first example edits 'testfile.tim', replacing all timing values >= 300
(5 minutes) with timing values <300 with an offset of 10 seconds. E.g. if the
timing value was 330, it would be replaced with (330 mod 300)+10, which is
The script expects 'testfile.tim' (timing file) and 'testfile.txt' (text file) to exist. The text file is not touched, but the script exits if it doesn't exist,
with the idea being that the user must have done something wrong and is trying
to treat the text output as a timing file, maybe.
You need a UNIX-like or Linux system, with the utilities 'mktemp', 'sed',
'cat', 'head', 'cut' and possibly others.
Apart from a couple of checks that the files exist, there isn't much checking
done. It might be possible to edit other files by changing the Sed command
file before the script exits, but you'd have to be fast.
|timesrt.sh.txt||Browser-viewable version (has a '.txt' suffix)|
|timesrt.sh||Downloadable version (will probably show as 'SH file')|
The author denies all responsibility for anything that may - or may not - occur
as a result of the use of this script. Not to be used in a medical situation,
for the control of power plants or the manufacture of hazardous equipment/items,
launch of rockets, warheads or whatever crazy stuff you people are up to.
Licence (sorry, I'm British*)
This program is licenced under GPLv3.
* : I'm considering appending this comment to the site CSS pages,
since I tend to say 'sorry' an awful lot, e.g. 'Sorry you bumped into me' or
'Sorry that I was complaining pointlessly about saying sorry'. Naturally, I should apologise for
being British, since - as with many nations - we have done a lot of very bad
things and being British, we have a natural tendency towards self-denigration
(or should that be 'self-flagellation'?), being morose, complaining about
the weather, asking ourselves how we are all the time (and not caring about
Back to the projects page
Back to the site index page