小编lzb*_*ari的帖子

关于“cat <<- _EOF_”的 shell 脚本

shell 脚本出错

line 6: warning: here-document at line 2 delimited by end-of-file (wanted `_EOF_')
Run Code Online (Sandbox Code Playgroud)

这是代码:

#!/bin/bash
    cat <<- _EOF_  
        test:  
        1. test  
        0. test test   
    _EOF_
Run Code Online (Sandbox Code Playgroud)

但这是对的。

#!/bin/bash
cat <<- _EOF_  
    test:  
    1. test  
    0. test test   
_EOF_  
Run Code Online (Sandbox Code Playgroud)

shell cat

4
推荐指数
1
解决办法
3152
查看次数

标签 统计

cat ×1

shell ×1