0
我嘗試從文件中提取特定模式。文件內容:從shell腳本中的文件中提取特定模式
--------some other command in here----------
<tr>
<td>someWords</td>
<td>anotherWords</td>
</tr>
--------some other command in here-----------
the <tr>...</tr> patter occur again
我嘗試從shell腳本文件
提取TR模式我寫:
讀取輸入
grep '<tr>\n<td>[A-Za-z0-9,<,>,/]</td>\n<td>[A-Za-z0-9,<,>,/]</td>\n</tr>
但是,此命令犯規工作。任何想法? THX
它因此未工作。我在我的外殼嘗試了它。因爲我使用的是標準輸入,所以我只寫sed -n'/
@ user1988385你是否喜歡'我的標準輸入命令| sed ...'它應該工作。 – Kent
w/my shell T.T有問題,我在終端上試了一下(使用sed -n'/
相關問題