单行文本
#! /bin/bash
echo 'hello world' > filename.txt
多行文本1
#! /bin/bash
cat>post.md<<EOF
---
layout: post
title: $name
subtitle: $name
date: $cudate
author: ivo
catalog: true
header-img:
tags:
-
-
---
EOF
````
### 多行文本2
#! /bin/bash
filename="~/documents/post.md"
cat>"${filename}"<<EOF
layout: post
title: $name
subtitle: $name
date: $cudate
author: ivo
catalog: true
header-img:
tags:
-
-
EOF
```
说明:
1.其中,<
3.$号要加\转义字符,不加转义字符的话是变量