1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-11-22 12:55:11 +00:00

Print confirmation feedback in add on success.

This commit is contained in:
William Melody 2015-09-11 19:47:52 -07:00
parent 12d11c2dc3
commit 590d75096f

7
hosts
View File

@ -685,10 +685,17 @@ add() {
"${ip}" \
"${hostname}" \
"${formatted_comment}" >> "${HOSTS_PATH}"
printf "Added:\n%s\t%s\t# %s\n" \
"${ip}" \
"${hostname}" \
"${formatted_comment}"
else
printf "%s\t%s\n" \
"${ip}" \
"${hostname}" >> "${HOSTS_PATH}"
printf "Added:\n%s\t%s\n" \
"${ip}" \
"${hostname}"
fi
fi
}