Awk基本入门[3] Awk Variables and Operators
1、Variables You don't need to declare an variable to use it. If you wish to initialize an awk variable, it is better to do it in the BEGIN section, which will be executed only once. There are no data types in Awk. Whether an awk variable is a number or a string depends on the context in which the variable is used in. employee-sal.txt sample file employee-sal.txt is a comma delimited file that contains 5 employee records in the following format: $ vi employee-sal.txt 101,John Doe,CEO,10000 102,Jason Smith,IT Manager,5000 103,Raj Reddy,Sysadmin,4500 104,Anand Ram,Developer,4500 105,Jane Miller