This repository has been archived on 2023-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
soft-an04/ReversalModel/to_csv.sh

13 lines
328 B
Bash
Raw Normal View History

2023-05-09 14:52:07 +00:00
#!/bin/bash
set -e
SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
cd "$SCRIPT_DIR"
cat time.txt | \
2023-05-10 11:41:23 +00:00
tr '\n' '#' | \
sed 's/real//g;s/user//g;s/sys//g;s/ */,/g;s/,#,/,/g;s/,#/#/g' | \
tr '#' '\n' | \
awk 'BEGIN { print "ltl,n,length,r,real,user,sys" } { print $0 }' > time.csv