How to store into a awk variable the contents of a small file, which has several lines (obviously without affecting its content - the line breaks, the successive spaces, etc) ?
In fact I must make with awk the equivalent of
the variables toto, titi, tata being calculated in awk.
I intend to do in awk
but for that I must be in the variable s the file contents, the equivalent of
Some one can help me?
In fact I must make with awk the equivalent of
Code:
cat file | sed "s|TOTO|$toto|g;s|TITI|$titi|g;s|TATA|$tata|g"
I intend to do in awk
Code:
#[b]awk code[/b]:
sub("TOTO",toto,s);sub("TITI",titi,s);sub("TATA",tata,s);print s
Code:
s=$(cat file)
Some one can help me?