Okay, my input file looks like this:
machine 192.168.1.26
login yourname
password password
My script looks like this:
{
print $0 sub(/192.168.1.26/, "0.0.0.0" > file
}
My output is this:
machine 0.0.0.0 1
login yourname0
password password0
Is there any way I can get it to use the sub without adding the extra numbers (1 and the 0's at the end of the lines) to be omitted?
machine 192.168.1.26
login yourname
password password
My script looks like this:
{
print $0 sub(/192.168.1.26/, "0.0.0.0" > file
}
My output is this:
machine 0.0.0.0 1
login yourname0
password password0
Is there any way I can get it to use the sub without adding the extra numbers (1 and the 0's at the end of the lines) to be omitted?