I have a file with multiple lines just like below:
beaster1
beaster2
beaster3
beaster4
I need to use sed to insert exactly the text below into the beginning of each line:
/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/
and it would > to file command_2 and look like below:
/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/beaster1
/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/beaster2 (and so on)
I tried:
sed -e 's/^/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/g' command_1 > command_2
and I keep getting the below so I don't think it is taking the "/" literally. Please help, it says command garbled!
sed: command garbled: s/^/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/g
beaster1
beaster2
beaster3
beaster4
I need to use sed to insert exactly the text below into the beginning of each line:
/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/
and it would > to file command_2 and look like below:
/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/beaster1
/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/beaster2 (and so on)
I tried:
sed -e 's/^/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/g' command_1 > command_2
and I keep getting the below so I don't think it is taking the "/" literally. Please help, it says command garbled!
sed: command garbled: s/^/opt/tmos/bin/ops_nui -file /home/bham_mta/rehome_scripts/g