Hi tgalati4
Thank you very much. That has got me a lot further.
All I am actually trying to do is enter a new "note" from the command line and have it added to the start of a text file - full of notes. There is no order or sorting, other than chronological, to the text file.
I tried using ...
Code:
cat - file2 > combined
i.e. the dash (-) taking input from the command line. But when I press ctrl+c to finish providing my input, the entire command quits and the combined file is not updated correctly. I hope that makes some sort of sense!?
Then I tried...
Code:
echo "My new note, directed at the head of an existing text file" | cat - file2 > combined
This DID work. So that's great, thank you. Any more bright ideas to make it even easier?
Many thanks
roly
edit: obviously I still then need to rename "combined" to "file2"
Bookmarks