BRO-CUT(1)

✨ NAME ✨

okay bestie, this is the manual page for bro-cut, and it's from the User Commands corner of the man page universe πŸ’– and what it does is parse bro logs. that's it. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

bro-cut [options] [<columns>]

πŸŽ€ DESCRIPTION πŸŽ€

so like, bro-cut pulls the columns you ask for out of an ASCII Bro log that's coming in on standard input πŸ“₯. if you don't give it any columns? it just selects all of them, no big deal, main character behavior. πŸ‘‘

and by default β€” and this is important, bestie β€” bro-cut does not include format header blocks in the output. like, it just skips them. so clean. so minimal. πŸ’…


πŸ’œ OPTIONS πŸ’œ

  • -c β€” includes the first format header block in the output. just the one. πŸ₯‡
  • -C β€” includes all format header blocks in the output. greedy in the best way, we love to see it. πŸ’–
  • -d β€” converts time values into a human-readable format. lowkey essential. needs gawk though, so check that first. 🫢
  • -D <fmt> β€” same energy as -d, but you get to specify the format for the time yourself. peep strftime(3) for the syntax. iykyk. 🧚
  • -F <ofs> β€” sets a different output field separator. so if you're not feeling the default, go off. 🌈
  • -n β€” prints all fields except the ones you specified. yes, it flips the whole thing. iconic. πŸ™ˆ
  • -u β€” like -d, but prints timestamps in UTC instead of local time. needs gawk too. ⭐
  • -U <fmt> β€” like -D, but prints timestamps in UTC instead of local time. needs gawk. 🌸

πŸ¦‹ ENVIRONMENT πŸ¦‹

  • BRO_CUT_TIMEFMT β€” for the time conversion, you can also specify the format string by setting the environment variable $BRO_CUT_TIMEFMT. so you literally never have to type it out again, obsessed. ✨

πŸ’– EXAMPLES πŸ’–

here's the moment you've been waiting for, bestie:

cat conn.log | bro-cut -d ts id.orig_h id.orig_p

cat the log, pipe it in, grab those columns, human-readable timestamps, slay. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

bro-cut was written by The Bro Project <info@bro.org>. πŸ’Œ

this manual page was written by RaΓΊl Benencia <rul@kalgan.cc> for the Debian project (but may be used by others). no gatekeeping here, the door is open. πŸŽ€


and that's the whole page fr fr πŸ’€ this is bro-cut, from the bro-cut source, dated November 2014. go forth and parse those logs, you absolute legend. πŸŒŸπŸ’…πŸ¦‹

πŸ“¦ where this page comes from