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:
parent
12d11c2dc3
commit
590d75096f
7
hosts
7
hosts
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user