• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

bash heredoc

开发技术 开发技术 2个月前 (04-18) 14次浏览

bash heredoc

reference article

  1. heredoc multi line comment

<< tips

hello world

tips

echo hello lina

bash heredoc

  1. heredoc cat message

cat << tips

hello world

see you again

love story

tips

bash heredoc

  1. heredoc redirection message

cat << tips > doc

hello world

see you again

love story

tips

cat doc

bash heredoc

  1. heredoc with variable

music1="see you again"

music2="love story"

cat << tips

hello world

${music1}

${music2}

tips

bash heredoc

  1. heredoc but variable but not replace

music1="see you again"

music2="love story"

cat << 'tips'

hello world

${music1}

${music2}

tips

bash heredoc

  1. heredoc suppress tab space with – symbol

cat <<- tips

	hello world

	see you again

	love story


tips


bash heredoc


程序员灯塔
转载请注明原文链接:bash heredoc
喜欢 (0)