I need to append a line to a file on remote server using Paramiko.
I'using the following code.
The problem is that it appends the line at the bottom of the file, and the requirement is to append it in middle at a particular line.
Any clue/help will be hugely appreciated
ftp = ssh_client.open_sftp()
file=ftp.file('file_name', "a", -1)
file.write('appending_line')
file.flush()
ftp.close()