#!/bin/bash if mkdir /etc/newsample then cp /etc/hosts /etc/newsample echo "The hosts file was successfully copied to" echo "/etc/newsample" else echo "The /etc/sample directory could not be created" fi