Adding a variable to a column in Linux
geodave
Arizona
Hello everyone,
I'm trying to add a predefined variable to a column in a text file in Linux. For example:
Any help or suggestions would be greatly appreciated!
geodave
I'm trying to add a predefined variable to a column in a text file in Linux. For example:
awk '{ print $1+2.50 }' file1.txt > file2.txtworks fine if I hard code the number 2.50 in the awk program. How would I go about making the 2.50 value a variable that I can predefine before the awk statement in a shell script?
Any help or suggestions would be greatly appreciated!
geodave
0
Comments
I assume you're doing this in a shell script?
geodave