Skip to content

問題9 ログの抽出の解答について #56

Closed

Description

@tena-beji

問題文では、”2016年12月25日3時台の最初のログまでを出力” となっていますが、解答例だと3時台のログすべてが出力されると思います。サンプルデータは1時間に1件のデータなので、問題文通りではありますが、問題文の条件は少なくとも1時間に1回はログがあるということなので、解答が正確ではないのかと思いました。ご確認いただけると幸いです。

Activity

  1. tena-beji commented on May 17, 2023

    @tena-beji
    Author

    別解2についてです。

  2. ryuichiueda commented on May 18, 2023

    @ryuichiueda
    Contributor

    そうですね。ご指摘ありがとうございます。

    いまどうやって訂正するか考え中です。

  3. ryuichiueda commented on May 18, 2023

    @ryuichiueda
    Contributor

    $ cat log_range.log | awk '$4" "$5>="[24/Dec/2016 21:00:00]" && $4" "$5<"[25/Dec/2016 03:59:60]" && a == 0;$4" "$5>"[25/Dec/2016 02:59:60]"{a++}'

    こういう感じで訂正を出しておきます。ありがとうございました!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions