awk - Overwriting a file in bash -
i have file, of part shown below:
output_filename="out.received.power.x.0.y.1.z.0.41 x_tx=0 y_tx=1 z_tx=0.41 i automatically change part of bash: every time see output_filename want on write name next , change new one. want same values x_tx, y_tx , z_tx: delete value next , rewrite new one. example instead of x_tx=0 want x_tx=0.3 or viceversa. think it's possible?maybe grep or so..
you can use sed this:
i.e. replace x_tx= x_tx=123 can do:
sed -i -e 's/x_tx=.*/x_tx=123/g' /tmp/file1.txt
Comments
Post a Comment