File: grep.fqtest

package info (click to toggle)
fq 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 106,624 kB
  • sloc: xml: 2,835; makefile: 250; sh: 241; exp: 57; ansic: 21
file content (73 lines) | stat: -rw-r--r-- 6,117 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
$ fq -i -d mp3 . test.mp3
mp3> grep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x44])
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x20|                                             40|               @|.frames[0].header.sample_rate: 44100 (0)
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0xe0|               50                              |     P          |.frames[1].header.sample_rate: 44100 (0)
     |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x1b0|               52                              |     R          |.frames[2].header.sample_rate: 44100 (0)
     |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x1c0|                        11 4b 36 4a 08 83 58 c9|        .K6J..X.|.frames[2].audio_data: raw bits
0x1d0|20 d4 29 52 98 c8 c8 f9 13 80 40 24 bc 91 23 42| .)R......@$..#B|
*    |until 0x283.7 (end) (188)                      |                |
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x40|      49 6e 66 6f                              |  Info          |.frames[0].tag.header: "Info" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
mp3> vgrep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x44])
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x20|                                             40|               @|.frames[0].header.sample_rate: 44100 (0)
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0xe0|               50                              |     P          |.frames[1].header.sample_rate: 44100 (0)
     |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x1b0|               52                              |     R          |.frames[2].header.sample_rate: 44100 (0)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x40|      49 6e 66 6f                              |  Info          |.frames[0].tag.header: "Info" (valid)
mp3> fgrep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x44])
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
mp3> bgrep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x44])
     |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x1c0|                        11 4b 36 4a 08 83 58 c9|        .K6J..X.|.frames[2].audio_data: raw bits
0x1d0|20 d4 29 52 98 c8 c8 f9 13 80 40 24 bc 91 23 42| .)R......@$..#B|
*    |until 0x283.7 (end) (188)                      |                |
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x40|      49 6e 66 6f                              |  Info          |.frames[0].tag.header: "Info" (valid)
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|49 44 33                                       |ID3             |.headers[0].header.magic: "ID3" (valid)
mp3> "64ff65ff66" | fromhex | bgrep("\u00ff"; "b")
   |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x0|64 ff 65 ff 66|                                |d.e.f|          |.: raw bits 0x0-0x5 (5)
mp3> grep_by(. == 44100)
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x20|                                             40|               @|.frames[0].header.sample_rate: 44100 (0)
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0xe0|               50                              |     P          |.frames[1].header.sample_rate: 44100 (0)
     |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
0x1b0|               52                              |     R          |.frames[2].header.sample_rate: 44100 (0)
mp3> grep_by(format == "id3v2")
    |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.headers[0]{}: header (id3v2)
0x00|49 44 33 04 00 00 00 00 00 23                  |ID3......#      |  header{}:
0x00|                              54 53 53 45 00 00|          TSSE..|  frames[0:1]:
0x10|00 0f 00 00 03 4c 61 76 66 35 38 2e 34 35 2e 31|.....Lavf58.45.1|
0x20|30 30 00                                       |00.             |
0x20|         00 00 00 00 00 00 00 00 00 00         |   ..........   |  padding: raw bits (all zero)
mp3> ^D