I have a text file named prac which has the numbers 1,2,3,4,5 in seperate lines. I want to generate the squares of these numbers using AWK command.
For this i wrote the following command:
awk 'BEGIN { a = $1; a = a ^ 2; print "a =", a }' prac
But the output shows a = 0
Please let me know my mistakes