Commit 93b7062
committed
fs/fs: Add hex option to 'cat' in fs cli
This adds '-x' and '-X' arguments to 'cat' command in filesystem cli.
Both switches enable hex dump for file contents as either plain hex dump
or hex dump with offset markings.
compat> cat -x blob
F9 FB 10 10 20 C6 34 F6 46 56 36 F6 57 07 02 C4 B2 25 40 F9 FB 01 74 ...
20 11 91 F6 AF 21 B1 3B 02 57 7F 00 00 00 00 31 01 61 05 78 1D B0 CE ...
74 AB 92 B4 75 B7 65 02 17 7D FF FF FF FF
compat> cat -X blob
0000: F9 FB 10 10 20 C6 34 F6 46 56 36 F6 57 07 02 4C
0010: B2 25 40 F9 FB 01 74 00 57 E5 5D E8 91 00 81 21
0020: 20 11 91 F6 AF 21 B1 3B 02 57 7F 00 00 00 00 13
0030: 01 61 05 78 1D B0 CE DA C1 D6 6A 66 AB 03 78 06
0040: 74 AB 92 B4 75 B7 65 02 17 7D FF FF FF FF1 parent 828b84d commit 93b7062
1 file changed
+36
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
169 | 173 | | |
| 174 | + | |
170 | 175 | | |
171 | | - | |
172 | | - | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
176 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
177 | 187 | | |
178 | | - | |
| 188 | + | |
179 | 189 | | |
180 | 190 | | |
181 | 191 | | |
182 | | - | |
183 | | - | |
| 192 | + | |
| 193 | + | |
184 | 194 | | |
185 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
186 | 200 | | |
187 | 201 | | |
188 | | - | |
189 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
190 | 217 | | |
191 | 218 | | |
192 | 219 | | |
| |||
0 commit comments