lunedì 29 agosto 2016

BasHack

So i discovered that I basically use this blog myself because I don't remember my own scripts (I am a really confused worker) so here's is another that took me 15 min to remember and re write:


#!/bin/bash
for d in */; do
awk '(NR>1) {print $1 "\t" $3 }' ${d}statistics > dij${d%/}
awk '(NR>1) {print $1 "\t" $7 }' ${d}statistics > kij${d%/}
head -n -2 dij${d%/} > temp; mv temp dij${d%/}
head -n -2 kij${d%/} > temp; mv temp kij${d%/}
done 

Nessun commento:

Posta un commento