0
I have a file with the name lista.txt
cat lista.txt
nome1
nome2
nome3
now I have searched the name with specific awk
awk '/nome2/' lista.txt
nome2
awk brings me the name I seek!!
now I want to add the name test below the one I sought!
the end result I want gets like this!
cat lista.txt
nome1
nome2
teste
nome3
know that it is possible in other ways as the use of sed for example!
the more I want to do it with awk
thank you very much! I had tried this before but put the 1 after the print action ! I realized that print adds the test name with a line break n ! this and pattern? I thought it would put aside !
– socket plus
@socketplus without line break is with
printf
.– fedorqui