Hi, I am trying something like this: Let's say I have a file called File1 with contents:
x=-0.3
y=2.1
z=9.0
I have another file, File2, with contents:
xx=
yy=
zz=
(nothing after "="). What I want to do is get the value of x in File1 and set it to xx in File2, i.e., xx=-0.3. And the same thing for y and z, value of y will be set to yy and z to zz (yy=2.1, zz=9.0).
Now, I want to do this with grep and sed and without using any other
language. Also, I cannot know the numbers in File1. The process should be automatic. Is there a way to do this in the command line itself? Only one step is enough, for example, x in File1 to xx in File2 step. thanks,