how to read one file and print its value in another file on a particular line
I have a file from which I have to read the value from the first line and store it in another file on a particular line number in the format
Code:
var="value" Code:
sed $'7{e sed "1!d" /source-file.txt\n}' -i /destination-file.txt |
Personally I would just use the read command to get the first line of the file into a variable and then use sed's insert option (see here)
to write the appropriate line to the file. |
That helped me.. Thanks a lot.. :) :)
|
All times are GMT -5. The time now is 11:29 PM. |