Swapping of fields in a file

Hi

I have afile with 15fields,say f1,f2....f15 delimited on comma. How can i swap the f1,f15 fields using unix shell commands or any script?

Thanks

see [here]](Swap Columns in File [Awk] - ghostdog74 — LiveJournal).

Thnxs...

awk '{
t=$5
$5=$1
$1=t
}1' file

In the code, what does "1" stands for?

just use {print} instead of 1.