如果搜索出来的连接不能用,把连接中间的日期去掉就好了,最近更改了所有连接的名字

shell中输入内容到文件

shell huahua 1425℃

单行文本

#! /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.其中,<test1.txt<<EOF 这间没有空格
3.$号要加\转义字符,不加转义字符的话是变量

转载请注明:EZLOST » shell中输入内容到文件

喜欢 (0)