You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
430 B
18 lines
430 B
2 years ago
|
#!/usr/bin/env sh
|
||
|
|
||
|
# 'say' is a more legible synonym for echo/printf
|
||
|
# Help! Why is this printing a newline??? printf isn't supposed to. Update: It is printing no newline at first then it starts printing one. ???
|
||
|
say() {
|
||
|
printf "%b\n" "${1}"
|
||
|
}
|
||
|
|
||
|
say_inline() {
|
||
|
printf "%b" "${1}"
|
||
2 years ago
|
}
|
||
|
|
||
|
# Check if the script is being called from another script
|
||
|
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
|
||
|
# If not, call the function
|
||
|
say "$@"
|
||
|
fi
|