#!/bin/bash # Cleans up logic analyzer data files prepended with "spike_times_" FILES=spike_times_* clean_file() { echo processing $f sed -i 's/{//g' $1 # remove '{' at beginning of file sed -i 's/}//g' $1 # remove '}' at end of file sed -i 's/\ //g' $1 # remove ' ' spaces sed -i 's/,/\n/g' $1 # replace ',' with newlines sed -i '/^$/d' $1 # remove empty lines } for f in $FILES do clean_file $f done
Homo habilis means 'handy man' in Latin. The name was given to one of the earliest members of the Homo genus known to make stone tools.
Wednesday, December 5, 2012
Logic Analyzer Spike Time Cleanup Script
Here's a little bash script I use for cleaning up data files of spike times returned by the logic analyzer experiment
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment