Hi eveyone. I am trying to read a file using vi editor and sort its content inside the file alphabetically which is only names on CAPITAL LETTERS, second field (JOHN, MIKE, JAYSON and TYLER).
The file is smth like this inside:
This is my vi script:
file="/home/students/domie/wine.txt" while IFS=: read -r f1 f2 f3 f4 f5 do tput cup $f1 0 ;echo "$f2 $f1 $f3 $f4 $f5" done <"$file"
I came up to here to sort them, but this only switches places of f2 with f1.
Can someone help me?
Edited by endri_1