Skip to content
Snippets Groups Projects
Commit 5cf032c7 authored by Sebastian Hofmann's avatar Sebastian Hofmann :point_up_tone3:
Browse files

added .bash script for raw sim data handling for results in 3.4

parent 391be32d
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# 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" -exec tail -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.
find -name "*GS*" -not -name "Probe_GS_1.txt" -exec tail -n+2 {} >> Probe_GS_1.txt \;
cut -f1-13 Probe_GS_1.txt > probeGS.txt
find -name "*KL*" -not -name "Probe_KL_1.txt" -exec tail -n+2 {} >> Probe_KL_1.txt \;
cut -f1-13 Probe_KL_1.txt > probeKL.txt
rm Probe*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment