Print multiline text "ONBOOT=\"YES\"\nIPADDR=10.42.84.168\nPREFIX=24" to the terminal, replacing '\n' with newline symbol, and append that text to file /etc/sysconfig/network-scripts/ifcfg-eth4 as root user.
echo -e "ONBOOT=\"YES\"\nIPADDR=10.42.84.168\nPREFIX=24" | sudo tee -a /etc/sysconfig/network-scripts/ifcfg-eth4