I'm writing bash script where I need to store some files as a
.bak files and change it content at the beginning(using
sed for that).
I'm looking for better way to write it down for my bash script.
cp file.txt file.txt.bak | sed -i '1i#Backup file' file.txt.bak
Maybe someone knew more efficient way to do this or how to do this only by sed or just without pipes.