|
|
How to append text via the command line
|
|
|
|
Dedicated MacNNer
Join Date: Apr 2002
Location: Chicago
Status:
Offline
|
|
Does anyone have an idea of how can I append text to a file via the command line.
I just want to be able to type the command in Terminal and have it append text to the file.
I don't want to open an application like vi or pico.
Any suggestions are welcome.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Mar 2004
Status:
Offline
|
|
Perhaps a more detailed example...
echo "your text goes here" >> /unix/path/to/the/file
if the text has any quotes *in* it,
then escape them with a backslash: \"
|
-HI-
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Apr 2002
Location: Chicago
Status:
Offline
|
|
Thank you Hal Itosis.
That worked great
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
And in case the text is in another file:
[codex]cat file_with_text_to_append >> resulting_file[/codex]
|
•
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|