Can I use my own variables within awk and sed for example:
I've written a while loop with a counter $i and I want to use the value of $i within sed and awk to edit certain lines of text within a data file.
I want to use :
sed '1s/$/texthere/g' birthday.csv
Like this:
sed '$is/$/$age/g' birthday.csv
but it only displays the name of the variable not the value it contains
$age is the result of a calculation created within the while loop that I would like to append to the end of each line.
Any help is greatly appreciated :)