I am trying to create a dev host file like below -
$hostname $ramratan-pc $sudo echo "127.0.0.1 ramratan-pc" >> /etc/hosts
How I can put output of
hostname in echo string?
I do not want to create bash script.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community