How can I put .Txt file A at the end of .Txt file B in terminal without opening the files?
From stackoverflow
-
Do you mean without opening them in an editor? Use
cat:cat A >> BThe
>>redirects the output of thecatcommand (which output fileA) to the fileB. But instead of overwriting contents ofB, it appends to it. If you use a single>, it will instead overwrite any previous content inB. -
cat A >> BShould do it. Not sure what you mean by "not opening", of course the files must be opened, in the operating system sense of the word, for this to happen.
The double arrow is "append".
-
Isn't it trivial?
cat A >> BAlex Reynolds : If it was trivial, the question wouldn't be asked.Alex Reynolds : -1. We're here to answer questions and help people, not cast aspersions. Get the chip off your shoulder.Judge Maygarden : Who has the chip on their shoulder? -
I am not sure what you mean by "opening the files", but
$ cat a.txt >> b.txtshould do the trick.
0 comments:
Post a Comment