Setting hostname probs...and .bashrc question...

Mark Lee mplee at
Wed Jan 8 21:58:37 PST 2003

On Wednesday 08 January 2003 22:52, you wrote:
> I'm using BSD style init scripts btw.
> In the hint it says to type these two lines:
> /bin/hostname `cat /etc/HOSTNAME |cut -d . -f1`
> /bin/domainname `cat /etc/HOSTNAME |cut -d . -f2-`
> which I've done...but that just sets my hostname as cat /etc/HOSTNAME |cut
> -d . -f1
> which is not, obviously, what i'm after...the /etc/HOSTNAME file contains:
> netserver.jericho

I think you might be missing that the cat command is not surrounded by normal 
quotes, but back quotes (same key as ~). These will evaluate the command and 
place the output in it's place. So, it would set the hostname to netserver 
and the domainname to jericho, which looks good?

Mark Lee
Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list