Adding the Contents of a Source File to the Beginning of a Target File

Following is *nix a command that you can use to add the contents of a source text file to the start of another text file (the source file).

echo -e '0r <source_file_name>\nw' | ed -s <target_file_name>

Leave a Reply