Write a command to print the squares of numbers from 1 to 10 using awk command?



Write a command to print the squares of numbers from 1 to 10 using awk command?..

Answer / Anjani Kumar

'for i in {1..10}; do echo '$i*$i'; done | awk '{print $1;}''

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Awk Interview Questions

What is the use of string function match(string,regex)?

1 Answers  


Write a command remove all empty lines?

1 Answers  


Usage of And/Or/Not operators in AWK?

1 Answers  


What is the use of format specifier %x ?

1 Answers  


What are Unary arithmetic operators?

1 Answers  


How to exit from an awk script using the exit command?

1 Answers  


How to Truncate Integers in AWK?

1 Answers  


What is the use of CONVFMT?

1 Answers  


What is FS in AWK?

1 Answers  


What is the use of string functiong sub(regex,replacement)?

1 Answers  


What is the use of numeric function srand ?

1 Answers  


What is the use of sequence ?

1 Answers  


Categories