Skip to main content
deleted 50 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 238

I'm new to Linux, so this might be a relatively simple task but my research failed me. I want to write a awk script where it should iterate through a input file which has only one word per line and assign it to a variable, and I have to do some string operations on it. I'm quite confused with how to take the word on each line (by referencing the input file entered in the terminal) and assign it to a variable. Please help me with this task. Thanks in advance.

I'm new to Linux, so this might be a relatively simple task but my research failed me. I want to write a awk script where it should iterate through a input file which has only one word per line and assign it to a variable, and I have to do some string operations on it. I'm quite confused with how to take the word on each line (by referencing the input file entered in the terminal) and assign it to a variable. Please help me with this task. Thanks in advance.

I'm new to Linux, so this might be a relatively simple task but my research failed me. I want to write a awk script where it should iterate through a input file which has only one word per line and assign it to a variable, and I have to do some string operations on it. I'm quite confused with how to take the word on each line (by referencing the input file entered in the terminal) and assign it to a variable.

Source Link
user304716
  • 23
  • 1
  • 1
  • 3

Writing a AWK script by taking the input file as an argument

I'm new to Linux, so this might be a relatively simple task but my research failed me. I want to write a awk script where it should iterate through a input file which has only one word per line and assign it to a variable, and I have to do some string operations on it. I'm quite confused with how to take the word on each line (by referencing the input file entered in the terminal) and assign it to a variable. Please help me with this task. Thanks in advance.