書式指定のprintf
a="The man" b="is Yoshida" # $aと$bをダブルクォーテーションで囲む必要が有ることに注意 c=$(printf "%s %s." "$a" "$b") echo $c # The man is Yoshida.
a="The man" b="is Yoshida" # $aと$bをダブルクォーテーションで囲む必要が有ることに注意 c=$(printf "%s %s." "$a" "$b") echo $c # The man is Yoshida.