/usr/bin/ls_name_value: line 47: basename: command not found
/usr/bin/ls_name_value: line 261: getopt: command not found
If any filenames might start with '-' then invoke like this:
ls_name_value [<any_options>] -- [<name>*]
Terminating...
Options (14)
| Option | Description | Source |
|---|
-a, --all | following Unix practice, by default when filenames in a directory are listed, those starting with '.' are hidden (i.e. not listed). | man |
-d, --dir | When give once, if any files in the NAME list are directories, then this script enters each directory and lists its name:value pairs. | man |
-e, --empty | in many cases the value associated with a filename is empty. | man |
-h, --help | print out the usage message then exit. | man |
-f, --native | this utility uses the ls command when listing out name:value pairs in a directory. | man |
-N, --nosym | in sysfs most symlinks (symbolic links) point to other directories rather than regular files. | man |
-n, --num NUM | NUM is the maximum number of bytes in the values shown. | man |
-o, --otherfs | as explained in the DESCRIPTION section above, sometimes entering into directories in other file systems can cause issues. | man |
-p, --physical | when this option is given, in the line following "enter directory: ..." the physical path of the entered directory is shown. | man |
-s, --show | usually only regular files are shown in name:value pair format. | man |
-u, --utf8 | when examining the contents of a file (i.e. the "value" in name:value pairs) once the top bit of any byte is set, then the default value output will be either "<contains non-ASCII chars>" or "<might… | man |
-v, --verbose | increase level or verbosity. | man |
-V, --version | prints out the version string then exits. | man |
-w, --write | the separator between the <name> and <value> is normally ":". | man |
Examples (2) from the manual page, untested
ls_name_value /sys/class/usb_power_delivery/
Here is an example of the same location with different combinations of the --show option and the --dir option:ls_name_value /sys/class/usb_power_delivery/ -s
pd0 ---> [../../devices/platform/USBC000:00/usb_power_delivery/pd0]
pd1 ---> [../../devices/platform/USBC000:00/usb_power_delivery/pd1]
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.