sto lavorando il seguente script bash:bash awk prima prima colonna e 3 ° colonna con tutto dopo
# contents of dbfake file
1 100% file 1
2 99% file name 2
3 100% file name 3
#!/bin/bash
# cat out data
cat dbfake |
# select lines containing 100%
grep 100% |
# print the first and third columns
awk '{print $1, $3}' |
# echo out id and file name and log
xargs -rI % sh -c '{ echo %; echo "%" >> "fake.log"; }'
exit 0
Questo script funziona bene, ma come faccio a stampare tutto nella colonna $ 3 e quindi tutte le colonne dopo?