首页 > 其他 > 详细

bash heredoc

时间:2021-04-19 01:20:32      阅读:27      评论:0      收藏:0      [点我收藏+]

bash heredoc

reference article

  1. heredoc multi line comment

<< tips

hello world

tips

echo hello lina

技术分享图片

  1. heredoc cat message

cat << tips

hello world

see you again

love story

tips

技术分享图片

  1. heredoc redirection message

cat << tips > doc

hello world

see you again

love story

tips

cat doc

技术分享图片

  1. heredoc with variable

music1="see you again"

music2="love story"

cat << tips

hello world

${music1}

${music2}

tips

技术分享图片

  1. heredoc but variable but not replace

music1="see you again"

music2="love story"

cat << ‘tips‘

hello world

${music1}

${music2}

tips

技术分享图片

  1. heredoc suppress tab space with - symbol

cat <<- tips

	hello world

	see you again

	love story


tips


技术分享图片

bash heredoc

原文:https://www.cnblogs.com/movit/p/14674976.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!