2021-08-13 17:40:28 +03:00
|
|
|
$ fq
|
2021-08-14 01:11:57 +03:00
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
2021-08-11 16:55:43 +03:00
|
|
|
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -h
|
2021-11-01 19:47:36 +03:00
|
|
|
fq - jq for binary formats
|
2021-12-04 19:20:12 +03:00
|
|
|
Tool, language and decoders for inspecting binary data.
|
2021-08-12 21:07:34 +03:00
|
|
|
For more information see https://github.com/wader/fq
|
|
|
|
|
2021-08-11 16:55:43 +03:00
|
|
|
Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
2021-10-30 19:35:21 +03:00
|
|
|
|
2022-01-29 14:18:03 +03:00
|
|
|
Example usages:
|
|
|
|
fq . file
|
|
|
|
fq d file
|
|
|
|
fq tovalue file
|
|
|
|
cat file.cbor | fq -d cbor torepr
|
|
|
|
fq 'grep("^main$") | parent' /bin/ls
|
|
|
|
fq 'grep_by(format == "exif") | d' *.png *.jpeg
|
|
|
|
|
2022-07-04 13:24:03 +03:00
|
|
|
--arg NAME VALUE Set variable $NAME to string VALUE
|
|
|
|
--argdecode NAME PATH Set variable $NAME to decode of PATH
|
|
|
|
--argjson NAME JSON Set variable $NAME to JSON
|
|
|
|
--color-output,-C Force color output
|
|
|
|
--compact-output,-c Compact output
|
|
|
|
--decode,-d NAME Decode format (probe)
|
|
|
|
--from-file,-f PATH Read EXPR from file
|
|
|
|
--help,-h [TOPIC] Show help for TOPIC (ex: --help, --help formats)
|
|
|
|
--include-path,-L PATH Include search path
|
|
|
|
--join-output,-j No newline between outputs
|
|
|
|
--monochrome-output,-M Force monochrome output
|
|
|
|
--null-input,-n Null input (use input and inputs functions to read)
|
|
|
|
--null-output,-0 Null byte between outputs
|
|
|
|
--option,-o KEY=VALUE Set option (ex: -o color=true, see --help options)
|
|
|
|
--raw-file NAME PATH Set variable $NAME to string content of file
|
|
|
|
--raw-input,-R Read raw input strings (don't decode)
|
|
|
|
--raw-output,-r Raw string output (without quotes)
|
|
|
|
--repl,-i Interactive REPL
|
|
|
|
--slurp,-s Read (slurp) all inputs into an array
|
|
|
|
--version,-v Show version
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -i
|
2020-06-08 03:29:51 +03:00
|
|
|
null> ^D
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq -i . test.mp3
|
2020-06-08 03:29:51 +03:00
|
|
|
mp3> ^D
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -n
|
2021-11-30 14:23:20 +03:00
|
|
|
null
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -ni
|
2020-06-08 03:29:51 +03:00
|
|
|
null> ^D
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -n 123
|
2020-06-08 03:29:51 +03:00
|
|
|
123
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -ni 123
|
2020-06-08 03:29:51 +03:00
|
|
|
number> ^D
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -n "[1,2,3]"
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
1,
|
|
|
|
2,
|
|
|
|
3
|
|
|
|
]
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -nc "[1,2,3]"
|
2020-06-08 03:29:51 +03:00
|
|
|
[1,2,3]
|
2022-03-03 15:37:35 +03:00
|
|
|
$ fq --help options
|
|
|
|
addrbase 16
|
|
|
|
arg []
|
2022-07-04 13:24:03 +03:00
|
|
|
argdecode []
|
2022-03-03 15:37:35 +03:00
|
|
|
argjson []
|
|
|
|
array_truncate 50
|
|
|
|
bits_format snippet
|
|
|
|
byte_colors 0-255=brightwhite,0=brightblack,32-126:9-13=white
|
|
|
|
color false
|
|
|
|
colors array=white,dumpaddr=yellow,dumpheader=yellow+underline,error=brightred,false=yellow,index=white,null=brightblack,number=cyan,object=white,objectkey=brightblue,prompt_repl_level=brightblack,prompt_value=white,string=green,true=yellow,value=white
|
|
|
|
compact false
|
2021-12-09 19:15:21 +03:00
|
|
|
completion_timeout 10
|
2022-03-03 15:37:35 +03:00
|
|
|
decode_format probe
|
|
|
|
decode_progress false
|
|
|
|
depth 0
|
|
|
|
display_bytes 16
|
|
|
|
expr .
|
2021-12-09 19:15:21 +03:00
|
|
|
expr_eval_path arg
|
2022-03-03 15:37:35 +03:00
|
|
|
expr_file
|
|
|
|
filenames [null]
|
|
|
|
force false
|
|
|
|
include_path
|
|
|
|
join_string \n
|
|
|
|
line_bytes 16
|
|
|
|
null_input false
|
|
|
|
raw_file []
|
|
|
|
raw_output false
|
|
|
|
raw_string false
|
|
|
|
repl false
|
|
|
|
show_formats false
|
|
|
|
show_help options
|
|
|
|
sizebase 10
|
|
|
|
slurp false
|
|
|
|
string_input false
|
|
|
|
unicode false
|
|
|
|
verbose false
|
2022-04-19 19:19:40 +03:00
|
|
|
width 135
|
2022-03-03 15:37:35 +03:00
|
|
|
$ fq --help formats
|
2021-09-17 16:46:13 +03:00
|
|
|
aac_frame Advanced Audio Coding frame
|
|
|
|
adts Audio Data Transport Stream
|
|
|
|
adts_frame Audio Data Transport Stream frame
|
2022-03-29 23:41:11 +03:00
|
|
|
amf0 Action Message Format 0
|
2021-09-17 16:46:13 +03:00
|
|
|
apev2 APEv2 metadata tag
|
2021-12-06 21:33:17 +03:00
|
|
|
ar Unix archive
|
2021-12-09 19:15:21 +03:00
|
|
|
asn1_ber ASN1 BER (basic encoding rules, also CER and DER)
|
2021-09-17 16:46:13 +03:00
|
|
|
av1_ccr AV1 Codec Configuration Record
|
|
|
|
av1_frame AV1 frame
|
|
|
|
av1_obu AV1 Open Bitstream Unit
|
|
|
|
avc_annexb H.264/AVC Annex B
|
|
|
|
avc_au H.264/AVC Access Unit
|
|
|
|
avc_dcr H.264/AVC Decoder Configuration Record
|
|
|
|
avc_nalu H.264/AVC Network Access Layer Unit
|
|
|
|
avc_pps H.264/AVC Picture Parameter Set
|
|
|
|
avc_sei H.264/AVC Supplemental Enhancement Information
|
|
|
|
avc_sps H.264/AVC Sequence Parameter Set
|
2021-12-28 22:05:10 +03:00
|
|
|
avro_ocf Avro object container file
|
2022-01-09 18:27:40 +03:00
|
|
|
bencode BitTorrent bencoding
|
2022-04-17 11:33:01 +03:00
|
|
|
bitcoin_blkdat Bitcoin blk.dat
|
|
|
|
bitcoin_block Bitcoin block
|
|
|
|
bitcoin_script Bitcoin script
|
|
|
|
bitcoin_transaction Bitcoin transaction
|
2022-01-03 22:17:01 +03:00
|
|
|
bsd_loopback_frame BSD loopback frame
|
2021-12-28 20:33:18 +03:00
|
|
|
bson Binary JSON
|
2021-09-17 16:46:13 +03:00
|
|
|
bzip2 bzip2 compression
|
2022-01-11 23:24:54 +03:00
|
|
|
cbor Concise Binary Object Representation
|
2022-06-01 17:55:55 +03:00
|
|
|
csv Comma separated values
|
2021-09-17 16:46:13 +03:00
|
|
|
dns DNS packet
|
2021-11-24 23:20:46 +03:00
|
|
|
dns_tcp DNS packet (TCP)
|
2021-09-17 16:46:13 +03:00
|
|
|
elf Executable and Linkable Format
|
2021-11-24 23:20:46 +03:00
|
|
|
ether8023_frame Ethernet 802.3 frame
|
2021-09-17 16:46:13 +03:00
|
|
|
exif Exchangeable Image File Format
|
2022-07-07 18:00:25 +03:00
|
|
|
fairplay_spc FairPlay Server Playback Context
|
2021-09-17 16:46:13 +03:00
|
|
|
flac Free Lossless Audio Codec file
|
|
|
|
flac_frame FLAC frame
|
2021-10-28 02:44:09 +03:00
|
|
|
flac_metadatablock FLAC metadatablock
|
2021-09-17 16:46:13 +03:00
|
|
|
flac_metadatablocks FLAC metadatablocks
|
|
|
|
flac_picture FLAC metadatablock picture
|
2021-10-28 02:44:09 +03:00
|
|
|
flac_streaminfo FLAC streaminfo
|
2021-09-17 16:46:13 +03:00
|
|
|
gif Graphics Interchange Format
|
|
|
|
gzip gzip compression
|
|
|
|
hevc_annexb H.265/HEVC Annex B
|
|
|
|
hevc_au H.265/HEVC Access Unit
|
|
|
|
hevc_dcr H.265/HEVC Decoder Configuration Record
|
|
|
|
hevc_nalu H.265/HEVC Network Access Layer Unit
|
2022-03-21 19:21:58 +03:00
|
|
|
hevc_pps H.265/HEVC Picture Parameter Set
|
|
|
|
hevc_sps H.265/HEVC Sequence Parameter Set
|
|
|
|
hevc_vps H.265/HEVC Video Parameter Set
|
2022-06-01 17:55:55 +03:00
|
|
|
html HyperText Markup Language
|
2021-09-17 16:46:13 +03:00
|
|
|
icc_profile International Color Consortium profile
|
2021-11-24 23:20:46 +03:00
|
|
|
icmp Internet Control Message Protocol
|
2022-04-01 17:31:55 +03:00
|
|
|
icmpv6 Internet Control Message Protocol v6
|
2021-09-17 16:46:13 +03:00
|
|
|
id3v1 ID3v1 metadata
|
|
|
|
id3v11 ID3v1.1 metadata
|
|
|
|
id3v2 ID3v2 metadata
|
2021-11-24 23:20:46 +03:00
|
|
|
ipv4_packet Internet protocol v4 packet
|
2022-04-01 17:31:55 +03:00
|
|
|
ipv6_packet Internet protocol v6 packet
|
2021-09-17 16:46:13 +03:00
|
|
|
jpeg Joint Photographic Experts Group file
|
2022-06-01 17:55:55 +03:00
|
|
|
json JavaScript Object Notation
|
2022-01-08 00:39:20 +03:00
|
|
|
macho Mach-O macOS executable
|
2021-09-17 16:46:13 +03:00
|
|
|
matroska Matroska file
|
|
|
|
mp3 MP3 file
|
|
|
|
mp3_frame MPEG audio layer 3 frame
|
2022-04-21 18:31:34 +03:00
|
|
|
mp4 ISOBMFF MPEG-4 part 12 and similar
|
2021-09-17 16:46:13 +03:00
|
|
|
mpeg_asc MPEG-4 Audio Specific Config
|
|
|
|
mpeg_es MPEG Elementary Stream
|
|
|
|
mpeg_pes MPEG Packetized elementary stream
|
|
|
|
mpeg_pes_packet MPEG Packetized elementary stream packet
|
|
|
|
mpeg_spu Sub Picture Unit (DVD subtitle)
|
|
|
|
mpeg_ts MPEG Transport Stream
|
2022-01-10 14:18:10 +03:00
|
|
|
msgpack MessagePack
|
2021-09-17 16:46:13 +03:00
|
|
|
ogg OGG file
|
|
|
|
ogg_page OGG page
|
|
|
|
opus_packet Opus packet
|
2021-11-23 00:08:36 +03:00
|
|
|
pcap PCAP packet capture
|
|
|
|
pcapng PCAPNG packet capture
|
2021-09-17 16:46:13 +03:00
|
|
|
png Portable Network Graphics file
|
|
|
|
protobuf Protobuf
|
|
|
|
protobuf_widevine Widevine protobuf
|
|
|
|
pssh_playready PlayReady PSSH
|
|
|
|
raw Raw bits
|
2022-03-29 23:41:11 +03:00
|
|
|
rtmp Real-Time Messaging Protocol
|
2021-11-24 23:20:46 +03:00
|
|
|
sll2_packet Linux cooked capture encapsulation v2
|
|
|
|
sll_packet Linux cooked capture encapsulation
|
2021-09-17 16:46:13 +03:00
|
|
|
tar Tar archive
|
2021-11-24 23:20:46 +03:00
|
|
|
tcp_segment Transmission control protocol segment
|
2021-09-17 16:46:13 +03:00
|
|
|
tiff Tag Image File Format
|
2022-06-01 17:55:55 +03:00
|
|
|
toml Tom's Obvious, Minimal Language
|
2021-11-24 23:20:46 +03:00
|
|
|
udp_datagram User datagram protocol
|
2021-09-17 16:46:13 +03:00
|
|
|
vorbis_comment Vorbis comment
|
|
|
|
vorbis_packet Vorbis packet
|
|
|
|
vp8_frame VP8 frame
|
|
|
|
vp9_cfm VP9 Codec Feature Metadata
|
|
|
|
vp9_frame VP9 frame
|
|
|
|
vpx_ccr VPX Codec Configuration Record
|
|
|
|
wav WAV file
|
|
|
|
webp WebP image
|
|
|
|
xing Xing header
|
2022-06-01 17:55:55 +03:00
|
|
|
xml Extensible Markup Language
|
|
|
|
yaml YAML Ain't Markup Language
|
2021-11-01 15:08:52 +03:00
|
|
|
zip ZIP archive
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -X
|
2021-08-09 13:47:20 +03:00
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
|
|
|
error: -X: no such argument
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq --X
|
2021-08-09 13:47:20 +03:00
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
|
|
|
error: --X: no such argument
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -.
|
2021-08-09 13:47:20 +03:00
|
|
|
exitcode: 2
|
|
|
|
stderr:
|
|
|
|
error: -.: no such argument
|