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
2023-05-10 13:41:23 +02:00

13 lines
No EOL
328 B
Bash
Executable file

#!/bin/bash
set -e
SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
cd "$SCRIPT_DIR"
cat time.txt | \
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