- 博客(1)
- 收藏
- 关注
原创 用shell脚本自动发送git commit -m “xxx“命令时,注释中有空格会报错的解决方法
问题现象 我们希望用shell脚本实现自动发送 git commit -m “line1 line2 line3 new line4” 命令的功能,shell脚本的代码如下: #!/bin/bash LINE1="line1" LINE2="line2" LINE3="line3" LINE4="new line4" git add . git commit -m ${LINE1}$'\n'${LINE2}$'\n'${LINE3}$'\n'${LINE4} 但是实际运行中发现,commit信息中如果有
2021-11-11 17:10:22
969
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人