Open6

bash

イネダイネダ
引数と標準入力両方をとれる関数
docker-library/mysql/8.0%2Fdocker-entrypoint.sh
Lines 5 to 22 in master

# logging functions
mysql_log() {
	local type="$1"; shift
	# accept argument string or stdin
	local text="$*"; if [ "$#" -eq 0 ]; then text="$(cat)"; fi
	local dt; dt="$(date --rfc-3339=seconds)"
	printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
}