I want to appends each line of the file as below:
file.txt :
adminsrv.tar
Output:
- archive: "packages/images/adminsrv.tar"
I tried several method like the one below and ended up with error:
input=/var/tmp/file.txt
while read -r line
Do
sed -i 's|$line|" - archive: "packages//images//$line"'
done < $input