Is there any way to read the user input through the awk programming?
I try writing a script to read a file which contained student’s name and ID.
I have to get the name of the student from the user through the keyboard and return all student’s results by using the awk.
Is there any way to read the user input through the awk programming? I
Share
You can collect user input using the
getlinefunction. Make sure to set this in theBEGINblock. Here’s the contents ofscript.awk:Here’s an example file with ID’s, names, and results:
Run like: