This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# script to generate PCAP from Trio exception trace. Potentially you may need to change POP_BYTES variable. | |
# Trio exception trace allows you to capture things like broken packets (checksum error), to see who is sending them | |
# clogin junos-trio-box | tee exception_trace | |
# start shell pfe network fpc0 | |
# show jnh 0 exceptions terse | |
# debug jnh exceptions N discard ## get N from above command | |
# debug jnh exceptions-trace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ FILE=/some/path/to/file.txt | |
################################### | |
### Remove matching suffix pattern | |
################################### | |
$ echo ${FILE%.*} # remove ext | |
/some/path/to/file | |
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts |