Hi,
I print some text in a file but every print statement writes on a new line and I wish to write on the same line.
For example the code
if (index(FAULTS, 18)) print fca[1] >> "faults.txt"
if (index(FAULTS, 23)) print fca[2] >> "faults.txt"
if (index(FAULTS, 37)) print fca[3] >> "faults.txt"
outputs some result like:
fsafvsa
fsafasf
fasdfge
and I would like to be:
fsafvsa fsafasf fasdfge
How can I do this?
PS: I know is a trivial question, I am new to awk
I print some text in a file but every print statement writes on a new line and I wish to write on the same line.
For example the code
if (index(FAULTS, 18)) print fca[1] >> "faults.txt"
if (index(FAULTS, 23)) print fca[2] >> "faults.txt"
if (index(FAULTS, 37)) print fca[3] >> "faults.txt"
outputs some result like:
fsafvsa
fsafasf
fasdfge
and I would like to be:
fsafvsa fsafasf fasdfge
How can I do this?
PS: I know is a trivial question, I am new to awk