LoginSignup
0
0

More than 3 years have passed since last update.

grep 操作間違いなど

Posted at

Autosar単語帳(作業中)
https://qiita.com/kaizen_nagoya/items/0927727a94b157df2df8

で処理していたら、

順番 word count 用語
210 systemtemplate 4400 システムテンプレート
211 structure 4361 構造
212 required 4358 必須
213 check 4356 小切手
214 using 4352 を使用して
215 signal 4323 信号
216 some 4271 いくつか
217 const 4259 const
218 hardware 4241 ハードウェア
219 identifiable 4207 識別可能
220 category 4205 カテゴリー
221 timing 4180 タイミング
222 operation 4158 操作
223 meta 4134 メタ
224 protocol 4134 プロトコル
225 b 4125 b
226 group 4118 グループ
227 received 4116 受け取った
228 chapter 4115
229 result 4111 結果
230 autosartemplates 4100 autosartemplates

system templates
autosartemplates
というように2語が1語になっている。

textファイルのディレクトリで

# grep systemtemplate *
# grep system  *
...
AUTOSAR_ATR_Features.pdf.txt:system description, ECU configuration description, and SW-C descriptions
AUTOSAR_ATR_Features.pdf.txt: Test the compatibility of the BSW stack with a system description,
AUTOSAR_ATR_Features.pdf.txt:RS_BRF_01440AUTOSAR services shall support system diagnostic
...

え、systemtemplate で検索語0?
systemだといっぱいでる。ファイルが空なわけじゃない。

all.txt と small.txtのdiffを取ってみる。

# cd ../work
# diff all.txt small.txt
...
2190448,2190449c2190448,2190449
< tf rame
< twindow
---
> TF RAME
> TWINDOW

# grep AUTOSARTEMPLATES  small.txt
M2::AUTOSARTEMPLATES::SWCOMPONENTTEMPLATE::DATATYPE::DATAPROTOTYPES

# cd ../text

# grep systemtemplate -i * 
AUTOSAR_TPS_SystemTemplate.pdf.txt:Document ID 63: AUTOSAR_TPS_SystemTemplate
AUTOSAR_TPS_SystemTemplate.pdf.txt:Document ID 63: AUTOSAR_TPS_SystemTemplate
AUTOSAR_TPS_SystemTemplate.pdf.txt:SystemTemplate::Fibex::Fibex4Ethernet::ServiceInstances::SoConIPduIdentifier.pduTriggering
AUTOSAR_TPS_SystemTemplate.pdf.txt:SystemTemplate::Fibex::Fibex4Ethernet::EthernetTopology::ApplicationEndpoint,

間違い1

小文字にするつもりが大文字にしていた。

間違い2

大文字のファイルを小文字で検索していた。

間違い3

大文字、小文字の識別をせずに検索すればよかった。

参考資料(reference)

プログラマに必須な検索技法
https://qiita.com/kaizen_nagoya/items/8ee1f5e241e2aee39f5c

文書履歴(document history)

ver. 0.01 初稿 20200117

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0