0
說到腳本編寫,我一點都不懂。我的腳本基本上將git log
命令的結果轉儲到文件中。根據內嵌日期從文件中獲取文本的特定部分
但是,我只想顯示腳本運行當天的行數。所以,如果我上週四6月20日運行myscript.sh,我希望看到一個文件中的所有行,直到週三月19
下面是該文件的樣子:
commit 8da0dd9bsd23899d11b4ee7348af0640b98ed4b17
Author: Denis <[email protected]>
Date: Thu Jun 20 12:08:59 2013 -0400
Testing Git push 13 6
Multiple lines
commit aca564549f91329fcfa9a9f908f7fdeffa83f139b
Author: Denis <[email protected]>
Date: Thu Jun 20 12:01:48 2013 -0400
Testing Git push 13 5
commit b80c51b32f48364c2108588aff4c9e12fbb78370b
Author: Denis <[email protected]>
Date: Thu Jun 20 11:59:57 2013 -0400
Testing Git push 13 4
commit c4f8f8d4196f7c0f2deaf8g0ecc61797e7b8afdd9
Author: Denis <[email protected]>
Date: Wed Jun 19 11:48:37 2013 -0400
Testing Git push 13 3
commit 9a296b2273528868e3e4dc19310fa802daf76b1f3
Author: Denis <[email protected]>
Date: Wed Jun 19 11:45:49 2013 -0400
Testing Git push 13 2
commit 55cb8f2399242f051f577a042713a402137df4456
Author: Denis <[email protected]>
Date: Sat Jun 15 11:40:48 2013 -0400
Testing Git push 13 1
commit a48e59ec1de227cc2878dce3330ge7776336eb289
Author: Denis <[email protected]>
Date: Thu Jun 13 11:28:56 2013 -0400
Switched datasource to SuprPakJ
Created WWButton and WWLabel (extends JButton and JLabel)
Designed Sales Order screen
commit 57ce2da4673a35f50a5146d43a1f1a969c590c8c9
Author: Denis <[email protected]>
Date: Tue Jun 11 08:20:58 2013 -0400
我試圖尋找,但我得到的最好的是sed -e
命令打印出來的一切,直到第一個空白行,這不完全是我需要的。
任何幫助表示讚賞!
那......精美的作品..!不夠感謝你!但謝謝你! –