To simplify sending larger files you can use: cat <(printf "classifieds\n") big-file.txt | nc nightfall.city 1915 This will prepend the classifieds line to the 'big-file.txt', so you don't have to edit the file. You still have to append the dot in the end yourself.