summaryrefslogtreecommitdiffstats
path: root/tests/test_file.sh
blob: 943268f191e186e8706a419040c1fa86545a9f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /bin/bash

shopt -s extglob

packet_size=1280
packets_per_dataset=25
packets_per_file=3150

rm -f roof_test.raw
for packet in $(seq 0 0); do
    for id in $(seq 1 16); do
        name=$(ls -- *$id.@(fx|dat) | grep -P "_0?$id\.\w+" | grep -v dark | grep -v flat)
        echo "Appending packet $packet from $name ..."
        dd if="$name" of="roof_test.raw" bs=$packet_size count=$packets_per_dataset skip=$((packet * $packets_per_dataset))  oflag=append conv=notrunc status=none
    done
done