neulab/tldr huggingface dataset:
-E, --external-converter-program=PATH Sets external converter program name to PATH.  Default external converter depends on how enca has been complied, and the possibility to use external converters may not be available at all.  Run
to find out default converter program in your enca build.
General options don't fit to other option categories...
-p, --with-filename Forces Enca to prefix each result with corresponding file name. By default, Enca prefixes results with filenames when run on multiple files.
Standard input is printed as STDIN and standard output as STDOUT (the latter can be probably seen in error messages only).
-P, --no-filename Forces Enca to not prefix results with file names.  By default, Enca doesn't prefix result with file name when run on a single file (including standard input).
-V, --verbose Increases verbosity level (each use increases it by one).
Currently this option in not very useful because different parts of Enca respond differently to the same verbosity level, mostly not at all.
Listings are all terminal, i.e. when Enca encounters some of them it prints the required listing and terminates without processing any following options.
-h, --help Prints brief usage help.
-G, --license Prints full Enca license (through a pager, if possible).
-l, --list=WORD Prints list specified by WORD (can be abbreviated as long as it is unambiguous).  Available lists include:
built-in-charsets.  All encodings convertible by built-in converter, by group (both input and output encoding must be from this list and belong to the same group for internal conversion).
built-in-encodings.  Equivalent to built-in-charsets, but considered obsolete; will be accepted with a warning, for a while.
converters.  All valid converter names (to be used with -C).
charsets.  All encodings (charsets).  You can select what names will be printed with --name or any name output type selector (of course, only encodings having a name in given namespace will be printed then), the selector must be specified before --list.
encodings.  Equivalent to charsets, but considered obsolete; will be accepted with a warning, for a while.
languages.  All supported languages together with charsets belonging to them.  Note output type selects language name style, not charset name style here.
names.  All possible values of --name option.
lists.  All possible values of this option.  (Crazy?)
surfaces.  All surfaces Enca recognises.
-v, --version Prints program version and list of features (see section FEATURES).
Though Enca has been originally designed as a tool for guessing encoding only, it now features several methods of charset conversion.  You can control which of them will be used with -C.
Enca sequentially tries converters from the list specified by -C until it finds some that is able to perform required conversion or until it exhausts the list.  You should specify preferred converters first, less preferred later.  External converter (extern) should be always specified last, only as last resort, since it's usually not possible to recover when it fails.  The default list of converters always starts with built-in and then continues with the first one available from: librecode, iconv, nothing.
It should be noted when Enca says it is not able to perform the conversion it only means none of the converters is able to perform it. It can be still possible to perform the required conversion in several steps, using several converters, but to figure out how, human intelligence is probably needed.
Built-in converter is the simplest and far the fastest of all, can perform only a few byte- to-byte conversions and modifies files directly in place (may be considered dangerous, but is pretty efficient).  You can get list of all encodings it can convert with
enca --list built-in
Beside speed, its main advantage (and also disadvantage) is that it doesn't care: it simply converts characters having a representation in target encoding, doesn't touch anything else and never prints any error message.
This converter can be specified as built-in with -C.
Librecode converter is an interface to GNU recode library, that does the actual recoding job. It may or may not be compiled in; run
to find out its availability in your enca build (feature +librecode-interface).
You should be familiar with recode(1) before using it, since recode is a quite sophisticated and powerful charset conversion tool.  You may run into problems using it together with Enca particularly because Enca's support for surfaces not 100% compatible, because recode tries too hard to make the transformation reversible, because it sometimes silently ignores I/O errors, and because it's incredibly buggy.  Please see GNU recode info pages for details about recode library.
This converter can be specified as librecode with -C.
Iconv converter is an interface to the UNIX98 iconv(3) conversion functions, that do the actual recoding job.  It may or may not be compiled in; run
to find out its availability in your enca build (feature +iconv-interface).
While iconv is present on most today systems it only rarely offer some useful set of available conversions, the only notable exception being iconv from GNU libc.  It is usually quite picky about surfaces, too (while, at the same time, not implementing surface conversion).  It however probably represents the only standard(ized) tool able to perform conversion from/to Unicode.  Please see iconv documentation about for details about its capabilities on your particular system.
This converter can be specified as iconv with -C.
External converter is an arbitrary external conversion tool that can be specified with -E option (at most one can be defined simultaneously).  There are some standard, provided together with enca: cstocs, recode, map, umap, and piconv.  All are wrapper scripts: for cstocs(1), recode(1), map(1), umap(1), and piconv(1).
Please note enca has little control what the external converter really does.  If you set it to /bin/rm you are fully responsible for the consequences.
If you want to make your own converter to use with enca, you should know it is always called
CONVERTER ENC_CURRENT ENC FILE [-]
where CONVERTER is what has been set by -E, ENC_CURRENT is detected encoding, ENC is what has been specified with -x, and FILE is the file to convert, i.e. it is called for each file separately.  The optional fourth parameter, -, should cause (when present) sending result of conversion to standard output instead of overwriting the file FILE.  The converter should also take care of not changing file permissions, returning error code 1 when it fails and cleaning its temporary files.  Please see the standard external converters for examples.
This converter can be specified as extern with -C.
Default target charset The straightforward way of specifying target charset is the -x option, which overrides any defaults.  When Enca is called as enconv, default target charset is selected exactly the same way as recode(1) does it.
If the DEFAULT_CHARSET environment variable is set, it's used as the target charset.
Otherwise, if you system provides the nl_langinfo(3) function, current locale's native charset is used as the target charset.
When both methods fail, Enca complains and terminates.
Reversibility notes If reversibility is crucial for you, you shouldn't use enca as converter at all (or maybe you can, with very specifically designed recode(1) wrapper).  Otherwise you should at least know that there four basic means of handling inconvertible character entities:
fail--this is a possibility, too, and incidentally it's exactly what current GNU libc iconv implementation does (recode can be also told to do it)
don't touch them--this is what enca internal converter always does and recode can do; though it is not reversible, a human being is usually able to reconstruct the original (at least in principle)
approximate them--this is what cstocs can do, and recode too, though differently; and the best choice if you just want to make the accursed text readable
drop them out--this is what both recode and cstocs can do (cstocs can also replace these characters by some fixed character instead of mere ignoring); useful when the to-be-omitted characters contain only noise.
Please consult your favourite converter manual for details of this issue. Generally, if you are not lucky enough to have all convertible characters in you file, manual intervention is needed anyway.
Performance notes Poor performance of available converters has been one of main reasons for including built-in converter in enca.  Try to use it whenever possible, i.e. when files in consideration are charset-clean enough or charset- messy enough so that its zero built-in intelligence doesn't matter.  It requires no extra disk space nor extra memory and can outperform recode(1) more than 10 times on large files and Perl version (i.e. the faster one) of cstocs(1) more than 400 times on small files (in fact it's almost as fast as mere cp(1)).
Try to avoid external converters when it's not absolutely necessary since all the forking and moving stuff around is incredibly slow.
You can get list of recognised character sets with
enca --list charsets
and using --name parameter you can select any name you want to be used in the listing.  You can also list all surfaces with
enca --list surfaces
Encoding and surface names are case insensitive and non-alphanumeric characters are not taken into account.  However, non-alphanumeric characters are mostly not allowed at all.  The only allowed are: `-', `_', `.', `:', and `/' (as charset/surface separator).  So `ibm852' and `IBM-852' are the same, while `IBM 852' is not accepted.
Charsets Following list of recognised charsets uses Enca's names (-e) and verbal descriptions as reported by Enca (-f):
ASCII         7bit ASCII characters ISO-8859-2    ISO 8859-2 standard; ISO Latin 2 ISO-8859-4    ISO 8859-4 standard; Latin 4 ISO-8859-5    ISO 8859-5 standard; ISO Cyrillic ISO-8859-13   ISO 8859-13 standard; ISO Baltic; Latin 7 ISO-8859-16   ISO 8859-16 standard CP1125        MS-Windows code page 1125 CP1250        MS-Windows code page 1250 CP1251        MS-Windows code page 1251 CP1257        MS-Windows code page 1257; WinBaltRim IBM852        IBM/MS code page 852; PC (DOS) Latin 2 IBM855        IBM/MS code page 855 IBM775        IBM/MS code page 775 IBM866        IBM/MS code page 866 baltic        ISO-IR-179; Baltic KEYBCS2       Kamenicky encoding; KEYBCS2 macce         Macintosh Central European maccyr        Macintosh Cyrillic ECMA-113      Ecma Cyrillic; ECMA-113 KOI-8_CS_2    KOI8-CS2 code (`T602') KOI8-R        KOI8-R Cyrillic KOI8-U        KOI8-U Cyrillic KOI8-UNI      KOI8-Unified Cyrillic TeX           (La)TeX control sequences UCS-2         Universal character set 2 bytes; UCS-2; BMP UCS-4         Universal character set 4 bytes; UCS-4; ISO-10646 UTF-7         Universal transformation format 7 bits; UTF-7 UTF-8         Universal transformation format 8 bits; UTF-8 CORK          Cork encoding; T1 GBK           Simplified Chinese National Standard; GB2312 BIG5          Traditional Chinese Industrial Standard; Big5 HZ            HZ encoded GB2312 unknown       Unrecognized encoding
where unknown is not any real encoding, it's reported when Enca is not able to give a reliable answer.
Surfaces Enca has some experimental support for so-called surfaces (see below). It detects following surfaces (not all can be applied to all charsets):
/CR     CR line terminators /LF     LF line terminators
/CRLF   CRLF line terminators N.A.    Mixed line terminators N.A.    Surrounded by/intermixed with non-text data /21     Byte order reversed in pairs (1,2 -> 2,1) /4321   Byte order reversed in quadruples (1,2,3,4 -> 4,3,2,1) N.A.    Both little and big endian chunks, concatenated /qp     Quoted-printable encoded
Note some surfaces have N.A. in place of identifier--they cannot be specified on command line, they can only be reported by Enca.  This is intentional because they only inform you why the file cannot be considered surface-consistent instead of representing a real surface.
Each charset has its natural surface (called `implied' in recode) which is not reported, e.g., for IBM 852 charset it's `CRLF line terminators'. For UCS encodings, big endian is considered as natural surface; unusual byte orders are constructed from 21 and 4321 permutations: 2143 is reported simply as 21, while 3412 is reported as combination of 4321 and 21.
Doubly-encoded UTF-8 is neither charset nor surface, it's just reported.
About charsets, encodings and surfaces Charset is a set of character entities while encoding is its representation in the terms of bytes and bits.  In Enca, the word encoding means the same as `representation of text', i.e. the relation between sequence of character entities constituting the text and sequence of bytes (bits) constituting the file.
So, encoding is both character set and so-called surface (line terminators, byte order, combining, Base64 transformation, etc.). Nevertheless, it proves convenient to work with some {charset,surface} pairs as with genuine charsets.  So, as in recode(1), all UCS- and UTF- encodings of Universal character set are called charsets.  Please see recode documentation for more details of this issue.
The only good thing about surfaces is: when you don't start playing with them, neither Enca won't start and it will try to behave as much as possible as a surface-unaware program, even when talking to recode.
Enca needs to know the language of input files to work reliably, at least in case of regular 8bit encoding.  Multibyte encodings should be recognised for any Latin, Cyrillic or Greek language.
You can (or have to) use -L option to tell Enca the language.  Since people most often work with files in the same language for which they have configured locales, Enca tries tries to guess the language by examining value of LC_CTYPE and other locale categories (please see locale(7)) and using it for the language when you don't specify any.  Of course, it may be completely wrong and will give you nonsense answers and damage your files, so please don't forget to use the -L option.  You can also use ENCAOPT environment variable to set a default language (see section ENVIRONMENT).
Following languages are supported by Enca (each language is listed together with supported 8bit encodings).
Belarusian    CP1251 IBM866 ISO-8859-5 KOI8-UNI maccyr IBM855 Bulgarian     CP1251 ISO-8859-5 IBM855 maccyr ECMA-113 Czech         ISO-8859-2 CP1250 IBM852 KEYBCS2 macce KOI-8_CS_2 CORK Estonian      ISO-8859-4 CP1257 IBM775 ISO-8859-13 macce baltic Croatian      CP1250 ISO-8859-2 IBM852 macce CORK Hungarian     ISO-8859-2 CP1250 IBM852 macce CORK Lithuanian    CP1257 ISO-8859-4 IBM775 ISO-8859-13 macce baltic Latvian       CP1257 ISO-8859-4 IBM775 ISO-8859-13 macce baltic Polish        ISO-8859-2 CP1250 IBM852 macce ISO-8859-13 ISO-8859-16 baltic CORK Russian       KOI8-R CP1251 ISO-8859-5 IBM866 maccyr Slovak        CP1250 ISO-8859-2 IBM852 KEYBCS2 macce KOI-8_CS_2 CORK
Slovene       ISO-8859-2 CP1250 IBM852 macce CORK Ukrainian     CP1251 IBM855 ISO-8859-5 CP1125 KOI8-U maccyr Chinese       GBK BIG5 HZ none
The special language none can be shortened to __, it contains no 8bit encodings, so only multibyte encodings are detected.
You can also use locale names instead of languages:
Belarusian      be Bulgarian       bg Czech           cs Estonian        et Croatian        hr Hungarian       hu Lithuanian      lt Latvian         lv Polish          pl Russian         ru Slovak          sk Slovene         sl Ukrainian       uk Chinese         zh
Several Enca's features depend on what is available on your system and how it was compiled.  You can get their list with
Plus sign before a feature name means it's available, minus sign means this build lacks the particular feature.
librecode-interface.  Enca has interface to GNU recode library charset conversion functions.
iconv-interface.  Enca has interface to UNIX98 iconv charset conversion functions.
external-converter.  Enca can use external conversion programs (if you have some suitable installed).
language-detection.  Enca tries to guess language (-L) from locales.  You don't need the --language option, at least in principle.
locale-alias.  Enca is able to decrypt locale aliases used for language names.
target-charset-auto.  Enca tries to detect your preferred charset from locales.  Option --auto-convert and calling Enca as enconv works, at least in principle.
ENCAOPT.  Enca is able to correctly parse this environment variable before command line parameters.  Simple stuff like ENCAOPT="-L uk" will work even without this feature.
The variable ENCAOPT can hold set of default Enca options.  Its content is interpreted before command line arguments.  Unfortunately, this doesn't work everywhere (must have +ENCAOPT feature).
LC_CTYPE, LC_COLLATE, LC_MESSAGES (possibly inherited from LC_ALL or LANG) is used for guessing your language (must have +language-detection feature).
The variable DEFAULT_CHARSET can be used by enconv as the default target charset.
Enca returns exit code 0 when all input files were successfully proceeded (i.e. all encodings were detected and all files were converted to required encoding, if conversion was asked for).  Exit code 1 is returned when Enca wasn't able to either guess encoding or perform conversion on any input file because it's not clever enough.  Exit code 2 is returned in case of serious (e.g. I/O) troubles.
It should be possible to let Enca work unattended, it's its goal. However:
There's no warranty the detection works 100%. Don't bet on it, you can easily lose valuable data.
Don't use enca (the program), link to libenca instead if you want anything resembling security. You have to perform the eventual conversion yourself then.
Don't use external converters. Ideally, disable them compile-time.
Be aware of ENCAOPT and all the built-in automagic guessing various things from environment, namely locales.
autoconvert(1), cstocs(1), file(1), iconv(1), iconv(3), nl_langinfo(3), map(1), piconv(1), recode(1), locale(5), locale(7), ltt(1), umap(1), unicode(7), utf-8(7), xcode(1)
It has too many unknown bugs.
The idea of using LC_* value for language is certainly braindead. However I like it.
It can't backup files before mangling them.
In certain situations, it may behave incorrectly on >31bit file systems and/or over NFS (both untested but shouldn't cause problems in practice).
Built-in converter does not convert character `ch' from KOI8-CS2, and possibly some other characters you've probably never heard about anyway.
EOL type recognition works poorly on Quoted-printable encoded files. This should be fixed someday.
There are no command line options to tune libenca parameters.  This is intentional (Enca should DWIM) but sometimes this is a nuisance.
The manual page is too long, especially this section.  This doesn't matter since nobody does read it.
Send bug reports to <https://github.com/nijel/enca/issues>.
Enca is Extremely Naive Charset Analyser.  Nevertheless, the `enc' originally comes from `encoding' so the leading `e' should be read as in `encoding' not as in `extreme'.
David Necas (Yeti) <yeti@physics.muni.cz>
Michal Cihar <michal@cihar.com>
Unicode data has been generated from various (free) on-line resources or using GNU recode.  Statistical data has been generated from various texts on the Net, I hope character counting doesn't break anyone's copyright.
Please see the file THANKS in distribution.
Copyright (C) 2000-2003 David Necas (Yeti).
Copyright (C) 2009 Michal Cihar <michal@cihar.com>.
Enca is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.
Enca is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Enca; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
jc(1)                        JSON CLI output utility                       jc(1)
jc - JSONifies the output of many CLI tools and file-types
COMMAND | jc PARSER [OPTIONS]
or "Magic" syntax:
jc [OPTIONS] COMMAND
jc JSONifies the output of many CLI tools and file-types for easier parsing in scripts. jc accepts piped input from STDIN and outputs a JSON representation of the previous command's output to STDOUT. Alternatively, the "Magic" syntax can be used by prepending jc to the command to be converted. Options can be passed to jc immediately before the command is given. (Note: "Magic" syntax does not support shell builtins or command aliases)
Parsers:
--acpi `acpi` command parser
--airport `airport -I` command parser
--airport-s `airport -s` command parser
--arp  `arp` command parser
--blkid `blkid` command parser
--cksum `cksum` and `sum` command parser
--crontab `crontab` command and file parser
--crontab-u `crontab` file parser with user support
--csv  CSV file parser
--csv-s CSV file streaming parser
--date `date` command parser
--df   `df` command parser
--dig  `dig` command parser
--dir  `dir` command parser
--dmidecode `dmidecode` command parser
--dpkg-l `dpkg -l` command parser
--du   `du` command parser
--env  `env` command parser
--file `file` command parser
--finger `finger` command parser
--free `free` command parser
--fstab `/etc/fstab` file parser
--group `/etc/group` file parser
--gshadow `/etc/gshadow` file parser
--hash `hash` command parser
--hashsum hashsum command parser (`md5sum`, `shasum`, etc.)
--hciconfig `hciconfig` command parser
--history `history` command parser
--hosts `/etc/hosts` file parser
--id   `id` command parser
--ifconfig `ifconfig` command parser
--ini  INI file parser
--iptables `iptables` command parser
--iw-scan `iw dev [device] scan` command parser
--jobs `jobs` command parser
--kv   Key/Value file parser
--last `last` and `lastb` command parser
--ls   `ls` command parser
--ls-s `ls` command streaming parser
--lsblk `lsblk` command parser
--lsmod `lsmod` command parser
--lsof `lsof` command parser
--lsusb `lsusb` command parser
--mount `mount` command parser
--netstat `netstat` command parser
--ntpq `ntpq -p` command parser
--passwd `/etc/passwd` file parser
--ping `ping` and `ping6` command parser
--ping-s `ping` and `ping6` command streaming parser
--pip-list `pip list` command parser
--pip-show `pip show` command parser
--ps   `ps` command parser
--route `route` command parser
--rpm-qi `rpm -qi` command parser
--sfdisk `sfdisk` command parser
--shadow `/etc/shadow` file parser
--ss   `ss` command parser
--stat `stat` command parser
--sysctl `sysctl` command parser
--systemctl `systemctl` command parser
--systemctl-lj `systemctl list-jobs` command parser
--systemctl-ls `systemctl list-sockets` command parser
--systemctl-luf `systemctl list-unit-files` command parser
--systeminfo `systeminfo` command parser
--time `/usr/bin/time` command parser
--timedatectl `timedatectl status` command parser
--tracepath `tracepath` and `tracepath6` command parser
--traceroute `traceroute` and `traceroute6` command parser
--ufw  `ufw status` command parser
--ufw-appinfo `ufw app info [application]` command parser
--uname `uname -a` command parser
--upower `upower` command parser
--uptime `uptime` command parser
--vmstat `vmstat` command parser
--vmstat-s `vmstat` command streaming parser
--w    `w` command parser
--wc   `wc` command parser
--who  `who` command parser
--xml  XML file parser
--yaml YAML file parser
-a     about jc (JSON output)
-d     debug - show traceback (use -dd for verbose traceback)
-h     help (-h --parser_name for parser documentation)
-m     monochrome output
-p     pretty print output
-q     quiet - suppress warnings (use -qq to ignore streaming parser errors)
-r     raw JSON output
-u     unbuffer output (useful for slow streaming data with streaming parsers)
-v     version information
Any fatal errors within jc will generate an exit code of 100, otherwise the exit code will be 0. When using the "Magic" syntax (e.g. jc ifconfig eth0), jc will store the exit code of the program being parsed and add it to the  jc exit code. This way it is easier to determine if an error was from the parsed program or jc.
Consider the following examples using `ifconfig`:
ifconfig exit code = 0, jc exit code = 0, combined exit code = 0 (no errors)
ifconfig exit code = 1, jc exit code = 0, combined exit code = 1 (error in ifconfig)
ifconfig exit code = 0, jc exit code = 100, combined exit code = 100 (error in jc)
ifconfig exit code = 1, jc exit code = 100, combined exit code = 101 (error in both ifconfig and jc)
You can specify custom colors via the JC_COLORS environment variable. The JC_COLORS environment variable takes four comma separated string values in the following format:
JC_COLORS=<keyname_color>,<keyword_color>,<number_color>,<string_color>
Where colors are: black, red, green, yellow, blue, magenta, cyan, gray, brightblack, brightred, brightgreen, brightyellow, brightblue, brightmagenta, brightcyan, white, or default
For example, to set to the default colors:
JC_COLORS=blue,brightblack,magenta,green
JC_COLORS=default,default,default,default
Most parsers load all of the data from STDIN, parse it, then output the entire JSON document serially. There are some streaming parsers (e.g. ls- s and ping-s) that immediately start processing and outputing the data line-by-line as JSON Lines (aka NDJSON) while it is being received from STDIN. This can significantly reduce the amount of memory required to parse large amounts of command output (e.g. ls -lR /) and can sometimes process the data more quickly. Streaming parsers have slightly different behavior than standard parsers as outlined below.
Note: Streaming parsers cannot be used with the "magic" syntax
Ignoring Errors
You may want to ignore parsing errors when using streaming parsers since these may be used in long-lived processing pipelines and errors can break the pipe. To ignore parsing errors, use the -qq cli option. This will add a _jc_meta object to the JSON output with a success attribute. If success is true, then there were no issues parsing the line. If success is false, then a parsing issue was found and error and line fields will be added to include a short error description and the contents of the unparsable line, respectively:
Successfully parsed line with -qq option: {
"command_data": "data",
"_jc_meta": {
"success": true
Unsuccessfully parsed line with -qq option: {
"success": false,
"error": "error message",
"line": "original line data"
Unbuffering Output
Most operating systems will buffer output that is being piped from process to process. The buffer is usually around 4KB. When viewing the output in the terminal the OS buffer is not engaged so output is immediately displayed on the screen. When piping multiple processes together, though, it may seem as if the output is hanging when the input data is very slow (e.g. ping):
$ ping 1.1.1.1 | jc --ping-s | jq
<slow output>
This is because the OS engages the 4KB buffer between jc and jq in this example. To display the data on the terminal in realtime, you can disable the buffer with the -u (unbuffer) cli option:
$ ping 1.1.1.1 | jc --ping-s -u | jq
{"type":"reply","pattern":null,"timestamp":null,"bytes":"64","response_ip":"1.1.1.1","icmp_seq":"1","ttl":"128","time_ms":"24.6","duplicate":false}
{"type":"reply","pattern":null,"timestamp":null,"bytes":"64","response_ip":"1.1.1.1","icmp_seq":"2","ttl":"128","time_ms":"26.8","duplicate":false}
Note: Unbuffered output can be slower for large data streams.
Custom local parser plugins may be placed in a jc/jcparsers folder in your local "App data directory":
- Linux/unix: $HOME/.local/share/jc/jcparsers
- macOS: $HOME/Library/Application Support/jc/jcparsers
- Windows: $LOCALAPPDATA\jc\jc\jcparsers
Local parser plugins are standard python module files. Use the jc/parsers/foo.py parser as a template and simply place a .py file in the jcparsers subfolder.
Local plugin filenames must be valid python module names, therefore must consist entirely of alphanumerics and start with a letter. Local plugins may override default plugins.
Note: The application data directory follows the XDG Base Directory Specification
Locale: For best results set the LANG locale environment variable to C or en_US.UTF-8. For example, either by setting directly on the command-line:
$ LANG=C date | jc --date
or by exporting to the environment before running commands:
$ export LANG=C
Timezones: Some parsers have calculated epoch timestamp fields added to the output. Unless a timestamp field name has a _utc suffix it is considered naive. (i.e. based on the local timezone of the system the jc parser was run on).
If a UTC timezone can be detected in the text of the command output, the timestamp will be timezone aware and have a _utc suffix on the key name. (e.g. epoch_utc) No other timezones are supported for aware timestamps.
Standard Syntax: $ dig www.google.com | jc --dig -p
Magic Syntax: $ jc -p dig www.google.com
For parser documentation: $ jc -h --dig
Kelly Brazil (kellyjonbrazil@gmail.com)
https://github.com/kellyjonbrazil/jc
Copyright (c) 2019-2021 Kelly Brazil
License:  MIT License
LLVM-AS(1)                            LLVM                            LLVM-AS(1)
llvm-as - LLVM assembler
llvm-as [options] [filename]
llvm-as is the LLVM assembler.  It reads a file containing human-readable LLVM assembly language, translates it to LLVM bitcode, and writes the result into a file or to standard output.
If filename is omitted or is -, then llvm-as reads its input from standard input.
If an output file is not specified with the -o option, then llvm-as sends its output to a file or standard output by following these rules:
• If the input is standard input, then the output is standard output.
• If the input is a file that ends with .ll, then the output file is of the same name, except that the suffix is changed to .bc.
• If the input is a file that does not end with the .ll suffix, then the output file has the same name as the input file, except that the .bc suffix is appended.
-f     Enable binary output on terminals.  Normally, llvm-as will refuse to write raw bitcode output if the output stream is a terminal. With this option, llvm-as will write raw bitcode regardless of the output device.
-o filename Specify the output file name.  If filename is -, then llvm-as sends its output to standard output.
If llvm-as succeeds, it will exit with 0.  Otherwise, if an error occurs, it will exit with a non-zero value.
llvm-dis(1), as(1)
LS(1P)                      POSIX Programmer's Manual                     LS(1P)
ls — list directory contents
ls [-ikqrs] [-glno] [-A|-a] [-C|-m|-x|-1] \ [-F|-p] [-H|-L] [-R|-d] [-S|-f|-t] [-c|-u] [file...]
For each operand that names a file of a type other than directory or symbolic link to a directory, ls shall write the name of the file as well as any requested, associated information. For each operand that names a file of type directory, ls shall write the names of files contained within the directory as well as any requested, associated information. Filenames beginning with a <period> ('.')  and any associated information shall not be written out unless explicitly referenced, the -A or -a option is supplied, or an implementation-defined condition causes them to be written. If one or more of the -d, -F, or -l options are specified, and neither the -H nor the -L option is specified, for each operand that names a file of type symbolic link to a directory, ls shall write the name of the file as well as any requested, associated information. If none of the -d, -F, or -l options are specified, or the -H or -L options are specified, for each operand that names a file of type symbolic link to a directory, ls shall write the names of files contained within the directory as well as any requested, associated information. In each case where the names of files contained within a directory are written, if the directory contains any symbolic links then ls shall evaluate the file information and file type to be those of the symbolic link itself, unless the -L option is specified.
If no operands are specified, ls shall behave as if a single operand of dot ('.')  had been specified. If more than one operand is specified, ls shall write non-directory operands first; it shall sort directory and non-directory operands separately according to the collating sequence in the current locale.
Whenever ls sorts filenames or pathnames according to the collating sequence in the current locale, if this collating sequence does not have a total ordering of all characters (see the Base Definitions volume of POSIX.1‐2017, Section 7.3.2, LC_COLLATE), then any filenames or pathnames that collate equally should be further compared byte-by-byte using the collating sequence for the POSIX locale.
The ls utility shall detect infinite loops; that is, entering a previously visited directory that is an ancestor of the last file encountered.  When it detects an infinite loop, ls shall write a diagnostic message to standard error and shall either recover its position in the hierarchy or terminate.
The ls utility shall conform to the Base Definitions volume of POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines.
-A        Write out all directory entries, including those whose names begin with a <period> ('.')  but excluding the entries dot and dot-dot (if they exist).
-C        Write multi-text-column output with entries sorted down the columns, according to the collating sequence. The number of text columns and the column separator characters are unspecified, but should be adapted to the nature of the output device. This option disables long format output.
-F        Do not follow symbolic links named as operands unless the -H or -L options are specified. Write a <slash> ('/') immediately after each pathname that is a directory, an <asterisk> ('*') after each that is executable, a <vertical-line> ('|') after each that is a FIFO, and an at-sign ('@') after each that is a symbolic link. For other file types, other symbols may be written.
-H        Evaluate the file information and file type for symbolic links specified on the command line to be those of the file referenced by the link, and not the link itself; however, ls shall write the name of the link itself and not the file referenced by the link.
-L        Evaluate the file information and file type for all symbolic links (whether named on the command line or encountered in a file hierarchy) to be those of the file referenced by the link, and not the link itself; however, ls shall write the name of the link itself and not the file referenced by the link. When -L is used with -l, write the contents of symbolic links in the long format (see the STDOUT section).
-R        Recursively list subdirectories encountered. When a symbolic link to a directory is encountered, the directory shall not be recursively listed unless the -L option is specified.  The use of -R with -d or -f produces unspecified results.
-S        Sort with the primary key being file size (in decreasing order) and the secondary key being filename in the collating sequence (in increasing order).
-a        Write out all directory entries, including those whose names begin with a <period> ('.').
-c        Use time of last modification of the file status information (see the Base Definitions volume of POSIX.1‐2017, <sys_stat.h>) instead of last modification of the file itself for sorting (-t) or writing (-l).
-d        Do not follow symbolic links named as operands unless the -H or -L options are specified. Do not treat directories differently than other types of files. The use of -d with -R or -f produces unspecified results.
-f        List the entries in directory operands in the order they appear in the directory. The behavior for non-directory operands is unspecified. This option shall turn on -a.  When -f is specified, any occurrences of the -r, -S, and -t options shall be ignored and any occurrences of the -A, -g, -l, -n, -o, and -s options may be ignored. The use of -f with -R or -d produces unspecified results.
-g        Turn on the -l (ell) option, but disable writing the file's owner name or number.  Disable the -C, -m, and -x options.
-i        For each file, write the file's file serial number (see stat() in the System Interfaces volume of POSIX.1‐2017).
-k        Set the block size for the -s option and the per-directory block count written for the -l, -n, -s, -g, and -o options (see the STDOUT section) to 1024 bytes.
-l        (The letter ell.) Do not follow symbolic links named as operands unless the -H or -L options are specified. Write out in long format (see the STDOUT section). Disable the -C, -m, and -x options.
-m        Stream output format; list pathnames across the page, separated by a <comma> character followed by a <space> character. Use a <newline> character as the list terminator and after the separator sequence when there is not room on a line for the next list entry. This option disables long format output.
-n        Turn on the -l (ell) option, but when writing the file's owner or group, write the file's numeric UID or GID rather than the user or group name, respectively. Disable the -C, -m, and -x options.
-o        Turn on the -l (ell) option, but disable writing the file's group name or number.  Disable the -C, -m, and -x options.
-p        Write a <slash> ('/') after each filename if that file is a directory.
-q        Force each instance of non-printable filename characters and <tab> characters to be written as the <question-mark> ('?') character. Implementations may provide this option by default if the output is to a terminal device.
-r        Reverse the order of the sort to get reverse collating sequence oldest first, or smallest file size first depending on the other options given.
-s        Indicate the total number of file system blocks consumed by each file displayed. If the -k option is also specified, the block size shall be 1024 bytes; otherwise, the block size is implementation-defined.
-t        Sort with the primary key being time modified (most recently modified first) and the secondary key being filename in the collating sequence.  For a symbolic link, the time used as the sort key is that of the symbolic link itself, unless ls is evaluating its file information to be that of the file referenced by the link (see the -H and -L options).
-u        Use time of last access (see the Base Definitions volume of POSIX.1‐2017, <sys_stat.h>) instead of last modification of the file for sorting (-t) or writing (-l).
-x        The same as -C, except that the multi-text-column output is produced with entries sorted across, rather than down, the columns. This option disables long format output.
-1        (The numeric digit one.) Force output to be one entry per line. This option does not disable long format output. (Long format output is enabled by -g, -l (ell), -n, and -o; and disabled by -C, -m, and -x.)
If an option that enables long format output (-g, -l (ell), -n, and -o is given with an option that disables long format output (-C, -m, and -x), this shall not be considered an error. The last of these options specified shall determine whether long format output is written.
If -R, -d, or -f are specified, the results of specifying these mutually- exclusive options are specified by the descriptions of these options above. If more than one of any of the other options shown in the SYNOPSIS section in mutually-exclusive sets are given, this shall not be considered an error; the last option specified in each set shall determine the output.
Note that if -t is specified, -c and -u are not only mutually-exclusive with each other, they are also mutually-exclusive with -S when determining sort order. But even if -S is specified after all occurrences of -c, -t, and -u, the last use of -c or -u determines the timestamp printed when producing long format output.
file      A pathname of a file to be written. If the file specified is not found, a diagnostic message shall be output on standard error.
The following environment variables shall affect the execution of ls:
COLUMNS   Determine the user's preferred column position width for writing multiple text-column output. If this variable contains a string representing a decimal integer, the ls utility shall calculate how many pathname text columns to write (see -C) based on the width provided. If COLUMNS is not set or invalid, an implementation-defined number of column positions shall be assumed, based on the implementation's knowledge of the output device. The column width chosen to write the names of files in any given directory shall be constant. Filenames shall not be truncated to fit into the multiple text-column output.
LC_COLLATE Determine the locale for character collation information in determining the pathname collation sequence.
LC_CTYPE  Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments) and which characters are defined as printable (character class print).
LC_TIME   Determine the format and contents for date and time strings written by ls.
TZ        Determine the timezone for date and time strings written by ls. If TZ is unset or null, an unspecified default timezone shall be used.
The default format shall be to list one entry per line to standard output; the exceptions are to terminals or when one of the -C, -m, or -x options is specified. If the output is to a terminal, the format is implementation-defined.
When -m is specified, the format used for the last element of the list shall be:
"%s\n", <filename>
The format used for each other element of the list shall be:
"%s,%s", <filename>, <separator>
where, if there is not room for the next element of the list to fit within the current line length, <separator> is a string containing an optional <space> character and a mandatory <newline> character; otherwise it is a single <space> character.
If the -i option is specified, the file's file serial number (see the Base Definitions volume of POSIX.1‐2017, <sys_stat.h>) shall be written in the following format before any other output for the corresponding entry:
%u ", <file serial number>
If the -l option is specified, the following information shall be written for files other than character special and block special files:
"%s %u %s %s %u %s %s\n", <file mode>, <number of links>, <owner name>, <group name>, <size>, <date and time>, <pathname>
If the -l option is specified, the following information shall be written for character special and block special files:
"%s %u %s %s %s %s %s\n", <file mode>, <number of links>, <owner name>, <group name>, <device info>, <date and time>, <pathname>
In both cases if the file is a symbolic link and the -L option is also specified, this information shall be for the file resolved from the symbolic link, except that the <pathname> field shall contain the pathname of the symbolic link itself. If the file is a symbolic link and the -L option is not specified, this information shall be about the link itself and the <pathname> field shall be of the form:
"%s -> %s", <pathname of link>, <contents of link>
The -n, -g, and -o options use the same format as -l, but with omitted items and their associated <blank> characters. See the OPTIONS section.
In both the preceding -l forms, if <owner name> or <group name> cannot be determined, or if -n is given, they shall be replaced with their associated numeric values using the format %u.
The <size> field shall contain the value that would be returned for the file in the st_size field of struct stat (see the Base Definitions volume of POSIX.1‐2017, <sys_stat.h>).  Note that for some file types this value is unspecified.
The <device info> field shall contain implementation-defined information associated with the device in question.
The <date and time> field shall contain the appropriate date and timestamp of when the file was last modified. In the POSIX locale, the field shall be the equivalent of the output of the following date command:
date "+%b %e %H:%M"
if the file has been modified in the last six months, or:
date "+%b %e %Y"
(where two <space> characters are used between %e and %Y) if the file has not been modified in the last six months or if the modification date is in the future, except that, in both cases, the final <newline> produced by date shall not be included and the output shall be as if the date command were executed at the time of the last modification date of the file rather than the current time. When the LC_TIME locale category is not set to the POSIX locale, a different format and order of presentation of this field may be used.
If the pathname was specified as a file operand, it shall be written as specified.
The file mode written under the -l, -n, -g, and -o options shall consist of the following format:
"%c%s%s%s%s", <entry type>, <owner permissions>, <group permissions>, <other permissions>, <optional alternate access method flag>
The <optional alternate access method flag> shall be the empty string if there is no alternate or additional access control method associated with the file; otherwise, it shall be a string containing a single printable character that is not a <blank>.
The <entry type> character shall describe the type of file, as follows:
d       Directory.
b       Block special file.
c       Character special file.
l (ell) Symbolic link.
p       FIFO.
-       Regular file.
Implementations may add other characters to this list to represent other implementation-defined file types.
The next three fields shall be three characters each:
<owner permissions> Permissions for the file owner class (see the Base Definitions volume of POSIX.1‐2017, Section 4.5, File Access Permissions).
<group permissions> Permissions for the file group class.
<other permissions> Permissions for the file other class.
Each field shall have three character positions:
1. If 'r', the file is readable; if '-', the file is not readable.
2. If 'w', the file is writable; if '-', the file is not writable.
3. The first of the following that applies:
S     If in <owner permissions>, the file is not executable and set- user-ID mode is set. If in <group permissions>, the file is not executable and set-group-ID mode is set.
s     If in <owner permissions>, the file is executable and set-user- ID mode is set. If in <group permissions>, the file is executable and set-group-ID mode is set.
T     If in <other permissions> and the file is a directory, search permission is not granted to others, and the restricted deletion flag is set.
t     If in <other permissions> and the file is a directory, search permission is granted to others, and the restricted deletion flag is set.
x     The file is executable or the directory is searchable.
-     None of the attributes of 'S', 's', 'T', 't', or 'x' applies.
Implementations may add other characters to this list for the third character position. Such additions shall, however, be written in lowercase if the file is executable or searchable, and in uppercase if it is not.
If any of the -l, -n, -s, -g, or -o options is specified, each list of files within the directory shall be preceded by a status line indicating the number of file system blocks occupied by files in the directory in 512-byte units if the -k option is not specified, or 1024-byte units if the -k option is specified, rounded up to the next integral number of units, if necessary. In the POSIX locale, the format shall be:
"total %u\n", <number of units in the directory>
If more than one directory, or a combination of non-directory files and directories are written, either as a result of specifying multiple operands, or the -R option, each list of files within a directory shall be preceded by:
"\n%s:\n", <directory name>
If this string is the first thing to be written, the first <newline> shall not be written. This output shall precede the number of units in the directory.
If the -s option is given, each file shall be written with the number of blocks used by the file. Along with -C, -1, -m, or -x, the number and a <space> shall precede the filename; with -l, -n, -g, or -o, they shall precede each line describing a file.
Many implementations use the <equals-sign> ('=') to denote sockets bound to the file system for the -F option. Similarly, many historical implementations use the 's' character to denote sockets as the entry type characters for the -l option.