Dynamically update a file with variable data
Hi,
Is there a tool in Linux that will allow me to insert row into a file from a variable or array?
I have been looking at Sed but i dont need to search and replace specific data within a file. In this example I would like to create a file named test, insert a row into test from an array or variable, perform a curl action with file test, loop around, replace the top row in file test with new data from an variable or array, perform an curl action with file test, loop around and continue until the loop is complete.
Is there a file editor that will allow me to perform this action?
Cheers
|