0

我是 Shell 脚本的新手。

谁能告诉我我应该在下面的脚本中做什么,而不是将日期/时间作为 git commit 的参数,它实际上会提示我输入评论?

#!/bin/bash

TODAY=$(date)
.............
.............
git commit -m "$TODAY"
............
............
4

2 回答 2

5
read -p "Comment: " comment
git commit -m "$comment"
于 2013-09-15T13:49:28.597 回答
2
#!/bin/bash
echo "Type the date, followed by [ENTER]:"

read TODAY
git commit -m "$TODAY"
于 2013-09-15T13:48:29.747 回答