Search code examples
linuxfileshellprepend

Prepend data from one file to another


How do I prepend the data from file1.txt to file2.txt?


Solution

  • The following command will take the two files and merge them into one

    cat file1.txt file2.txt > file3.txt; mv file3.txt file2.txt