QuestionQ20
Automation, Orchestration, and ScriptingA systems administrator is making configuration changes and must replace a hostname in a particular file. Which command should the administrator use to perform this task?
- A cut -d oldhostname /etc/configuration.file | vi newhost.name
- B sed -i 's/oldhostname/newhostname/' /etc/configuration.file
- C cat /etc/configuration.file | grep oldhostname > newhost.name
- D grep oldhostname /etc/configuration.file | awk '{print $1 newhostname}'
Community Discussion