Member Avatar for herrschteiner

I'm writing a bash script that redirects the output of a command to a file.

The next thing the script should do is read the contents of the file, into the tenth line of a python script.

It's tricky, because the line of text in the python script should read:

var = 'TEXT_FROM_FILE'

I've been at this for days, and the farthest I've gotten is getting the var = ' written to the tenth line of my python script. I have read through the sed manual, http://www.grymoire.com/Unix/Sed.html, and several other tutorials on sed. I can not figure out the last bit, which places TEXT_FROM_FILE and the single quote after.

Can anyone help me out with this?

Why don't you it read directly from the file or read the output as an argument for the python script?

Is it a multi line string?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.