dodb.cr/bin/summary-to-truncated-data.sh

17 lines
238 B
Bash
Raw Normal View History

2024-05-23 22:58:57 +02:00
#!/bin/sh
if [ $# -ne 1 ]
then
echo "usage: $0 result-directory"
exit 0
fi
dir=$1
echo "from data (.d) to truncated data (.t)"
for i in $dir/*.d
do
fname=$(echo $i | sed "s/[.]d$/.t/")
awk '{ print $2, $3, $5 }' < $i > $fname
done