Re: sed :(
josep schreef:
why isn't it working? :(
sed -i "s/#send host-name "andare.fugue.com
<http://andare.fugue.com>";/send host-name $(cat /etc/hostname)/g"
/etc/dhcp3/dhclient.conf
You're using quotes inside quotes. Try this:
sed -i "s/#send host-name "\""andare.fugue.com"\"";/send host-name
"\""$(cat /etc/hostname)"\""/g" /etc/dhcp3/dhclient.conf
You forgot quotes once, and you need to escape the quotes inside the
quotes, and in Bash you do it the way I mentioned; "\"".
Sjors
Reply to:
- References:
- sed :(
- From: josep <k.joseph1977@gmail.com>