Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Grep

2,232 views

Published on

grep Technic

Published in: Software
  • Be the first to comment

  • Be the first to like this

Grep

  1. 1. grep
  2. 2. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq 伝えたいこと grepで出来な い検索は無い!
  3. 3. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq 経歴・スキル •経歴 Future中途5年目のgreper •スキルセット grep+α •得意なgrepコンボ find -> grep -> cut -> sort -> uniq -> while ->find -> grep -> awk!!!! だいたいこれでワンパン出来 るぞ! 当然ワンライナーだ!
  4. 4. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq 社内Greperを勝手に代表 して語らせてもらいます! ツッコミは終わってからこっそりお願いします。。。
  5. 5. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq ここからの内容は日常で は99%、 お仕事でも95%不要な 自己満足です。
  6. 6. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq !!!警告!!! こんな人を対象にしてます grep = 手足の様に使える find =もはやgrepのオプションだよね? while = もはや(ry cut/sed/tr/sed/uniq/awk = (ry
  7. 7. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq お題
  8. 8. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep使ってソース解析! 某L案件のBがつくFWを使ったSアプ リを解析! 画面のmethod単位にテーブルまでの 経路をgrepで出力だ!
  9. 9. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq DBLogicWEB Grep使ってソース解析! 動機 何故かドキュメントからCRUDを追えず、各種調査の 為にはソースから追うしか無かった。 Action Facade Logic Logic SQL SQL table table 1:1 1:n 1:1 1:n 1:n 1:1 Util Action この画面で 使っている コレ知りた い!
  10. 10. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep使ってソース解析! 解析の概要 Import ….XXXX public/private/prote cted..(){ … } public/private/prote cted..(){ XXXX.YYY } public/private/prote cted.. YYY(){ …ZZZZ } Import ….ZZZZ ① findでHTTPを受けるActionを探す ② ImportにTARGETになるClassが含まれているか grep ③ 読んでいるmethodを上からgrep ④ 読んでいたらネストしてやっぱり2-3を繰り返す …繰り返す
  11. 11. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep使ってソース解析! 結果 実演が流行りらしいので、動かして みます
  12. 12. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep使ってソース解析! 自己満ロジック Method判定処理 grep -nE "(protected|private|public) .*(" ${FILE_NAME}|grep -A 1 "${METHOD}"|cut -d: -f1 278: public void ${METHOD} () { 290: public void ${NEXT_METHOD}() { grepで検索したいMethodを引っ掛けて、次のMethodの行 数からMethodの範囲を判定!
  13. 13. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep使ってソース解析! 自己満ロジック Methodの中から目的のmethod Call判定 cat ${IMPLE} | head -$((METHOD_END-1)) | tail -`expr $((METHOD_END-1)) - $((METHOD_START+0)) + 1`|grep -ic ${CALL} public void ${METHOD} () { ・・・・ ${CALL} ・・・・ } grepでMethodを抜いて、methodのcall判定!
  14. 14. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq 書いたソース 動機 生々しかったり汚かったり 色々あるけど、急いでたか ら許して・・・
  15. 15. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq 実行したコマンド利用回数 コマンド 使った回数 grep 17回(ソースが糞だから? find 15回 while 10回 sort 5回 uniq 4回 awk 4回 解析したソース
  16. 16. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq 感想 grep やっぱりすげー 糞ループでこの速度 スピード感半端ないっす ルールさえ判れば何でも抜ける気が しました。
  17. 17. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq まとめ
  18. 18. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq grep の鉄則 ルール化できれば 勝ったも同然
  19. 19. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq トレンドから外れようが良い ものは良い。 grepを使いこなすとServer からテキストファイルをダウ ンロードしてExcelで解析と かいう謎行動が激減するので 使ってみてね!
  20. 20. find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq Grep uniq cut sed while do find find Grep uniq cut sed while do do find Grep uniq cut sed while while do find Grep uniq cut sed sed while do find Grep uniq cut cut sed while do find Grep uniq やっぱり grepで出来 ない検索は無 かった!

×