Hi all,
I have a text file which is just a journal to be filled in by the operator after a backup, when it's printed. I want to write a script which will either insert a '*', or the host name (using environemnt variable HOST) in a certain row/column; or edit the journal file replacing "( ) Home" with "(*) Home", or "Server: "with "Server: $HOST" where $HOST is an environemnt variable. I have been trying to use 'sed', but without much success.
I don't have much (very little really ) experience with sed. The following is the command I use and the error message I keep getting:
# sed -e '15,s/( ) Home/(*) Home' /tmp/bkuplog.msg.bak
sed: command garbled: 15,s/( ) Home/(*) Home
#
Does anyone have any ideas or perhaps a script already written which can help me. Any help is appreciated, thanks.
- Stuart
I have a text file which is just a journal to be filled in by the operator after a backup, when it's printed. I want to write a script which will either insert a '*', or the host name (using environemnt variable HOST) in a certain row/column; or edit the journal file replacing "( ) Home" with "(*) Home", or "Server: "with "Server: $HOST" where $HOST is an environemnt variable. I have been trying to use 'sed', but without much success.
I don't have much (very little really ) experience with sed. The following is the command I use and the error message I keep getting:
# sed -e '15,s/( ) Home/(*) Home' /tmp/bkuplog.msg.bak
sed: command garbled: 15,s/( ) Home/(*) Home
#
Does anyone have any ideas or perhaps a script already written which can help me. Any help is appreciated, thanks.
- Stuart