# This script must be executed in the out/Stats folder. Attention! The script deletes all unprocessed raw data. Execute only if it works safely!!!
for f in$(ls-d*Probe*)# Go to all files that contain "Probe"
do
num=$(echo$f | cut-d'_'-f3 | cut-d'.'-f1)
# Outputs the file name. Separates the string at all places where "_" occurs and keeps the third string; then separates this one at all "." and keeps the first string. Example: Sample_ideal_500.txt -> 500.txt -> 500
sed-i"s/^/$num\t/"$f#Inserts the string from the top into the first column. The rest moves one column to the right.
done
find -name"*ideal*"-not-name"Probe_ideal_1.txt"-exectail-n+2 {}>> Probe_ideal_1.txt \;#Find all "ideal" and add them to file 1. Skip the header.
cut-f1-13 Probe_ideal_1.txt > probeIdeal.txt #Remove all columns that are not 1-13 and rename the file.