Unix command help

AgentEL

Golden Member
Jun 25, 2001
1,327
0
0
I need help from Unix gurus on AT.

I want to be able to append some text to the end of a file. For example, I want to do:

prompt% <some_unix_command> "Version 3.1" <file_to_append_to>

The result would be that after opening the <file_to_append_to> in a text editor would show "Version 3.1" at the end.

It could be any combination of commands like "cat" or "echo" and can use the ">" or ">>" or "|" as needed.

I can't do something like:

prompt% cat >> <file_to_append>

The reason is because it needs to the text from standard input to append to the file. I can't manually type in the text in the script I'm using. The text to append would have to be passed in as a parameter to the command.

Any ideas?
 

AgentEL

Golden Member
Jun 25, 2001
1,327
0
0
Nevermind got it. In case anyone is interested:

prompt% echo "Text here" >> <file_to_append_to>

works.