mirror of
https://github.com/octoleo/hosts.git
synced 2024-05-31 05:30:47 +00:00
Print confirmation feedback in add
on success.
This commit is contained in:
parent
12d11c2dc3
commit
590d75096f
7
hosts
7
hosts
|
@ -685,10 +685,17 @@ add() {
|
||||||
"${ip}" \
|
"${ip}" \
|
||||||
"${hostname}" \
|
"${hostname}" \
|
||||||
"${formatted_comment}" >> "${HOSTS_PATH}"
|
"${formatted_comment}" >> "${HOSTS_PATH}"
|
||||||
|
printf "Added:\n%s\t%s\t# %s\n" \
|
||||||
|
"${ip}" \
|
||||||
|
"${hostname}" \
|
||||||
|
"${formatted_comment}"
|
||||||
else
|
else
|
||||||
printf "%s\t%s\n" \
|
printf "%s\t%s\n" \
|
||||||
"${ip}" \
|
"${ip}" \
|
||||||
"${hostname}" >> "${HOSTS_PATH}"
|
"${hostname}" >> "${HOSTS_PATH}"
|
||||||
|
printf "Added:\n%s\t%s\n" \
|
||||||
|
"${ip}" \
|
||||||
|
"${hostname}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user