|
Appending Text Files From Bash Script
Hello all. Newb here again.
I have a script that is simply piping standard input (from keyboard) into a text file:
cat >> myFile.txt
What I woudl like to do is actually append this file everytime the script is run. I'm pretty sure I use the "sed" command but I am a little confused as to whether or not I should use the "tail" command or not instead. Basically, I want the new text entered inot my shell to be placed after the last line of text in the file. I can only find examples of finding text that exists and editing it, not going to the blank spot and entering it there.
Help?
Cheer,
alts
|