Skip to content

Instantly share code, notes, and snippets.

@mmguero
Created February 19, 2026 18:35
Show Gist options
  • Select an option

  • Save mmguero/6fb676b0755a7b0be80304ed61fedfee to your computer and use it in GitHub Desktop.

Select an option

Save mmguero/6fb676b0755a7b0be80304ed61fedfee to your computer and use it in GitHub Desktop.
PCAP file time ranges
for f in *.*; do
IFS=$'\t' read -r start end <<EOF
$(capinfos -a -e "$f" |
awk -F'time:[[:space:]]*' '/time:/{sub(/\..*/,"",$2); print $2}' |
paste -sd $'\t' -)
EOF
jo -n -- "$f=$(jo start="$start" end="$end")"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment