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


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to