I have two text files, file_1 and file_2. How can I concatenate file_2, from line 20 onwards, with file_1?
ed -s file_1 <<< $'r !sed -e 1,19d file_2\nwq'
-s= suppress diagnostic output
<<<= redirect ed's input to be the following here-string
$' ... '= supply the following quoted string
r= tell ed to read from the following ...
!sed -e 1,19d file_2= command, instead of a file; ask sed to show us everything except lines 1 through 19 (delete them) of file_2
wq= write and quit!
If I understand your question correctly, you want lines 20 onwards from file_2, followed by file_1's contents. I would do this:
( tail -n +20 file_2; cat file_1 ) > file_3