UNIX script to interchange column values

Hi,

I have the below script which is fetching the data from a file as below:

 
awk -F "~" 'NR>1 {print $5}' 1.txt

The o/p is like:

 
1452350
1458638
1452350
2
5696837

No i want to put 5696837 before 1458638 in above o/p
So final o/p should look like:

 
1452350
5696837
1458638
1452350
2

pls help.

I don't think there is enough detail here. It is not clear what the logic should be. This in not stated well enough to be programmed.

try:

awk -F "~" 'NR>1 {l=a[NR]=$5} END {for (i=2; i<=NR-1; i++) {if (i==3) print l ; if (a) print a}}' 1.txt