How to do this scenario? Open a file for edit mode and go to last line in the file and append the result of another shell script to this file.