====== BASH - Files - Swap fields in a file ====== Swap the first 2 fields. awk '{tmp = $1; $1 = $2; $2 = tmp; print}' filename