Show creator and owner.
*-e*, *--export*::
-Produce output in the form of key="value" pairs. All potentially unsafe value characters are hex-escaped (\x<code>). The key (variable name) will be modified to contain only characters allowed for a shell variable identifiers, for example, USE_PCT instead of USE%.
+Produce output in the form of key="value" pairs. All potentially unsafe value characters are hex-escaped (\x<code>). See also option *--shell*.
*-J*, *--json*::
Use the JSON output format.
*-P*, *--numeric-perms*::
Print numeric permissions in PERMS column.
+*-y*, *--shell*::
+The column name will be modified to contain only characters allowed for shell variable identifiers. This is usable, for example, with *--export*. Note that this feature has been automatically enabled for *--export* in version 2.37, but due to compatibility issues, now it's necessary to request this behavior by *--shell*.
+
== EXIT STATUS
0::
int outmode;
unsigned int noheadings : 1, /* don't print header line */
notrunc : 1, /* don't truncate columns */
+ shellvar : 1, /* use shell compatible colum names */
bytes : 1, /* SIZE in bytes */
numperms : 1, /* numeric permissions */
time_mode : 2;
fputs(_(" -P, --numeric-perms print numeric permissions (PERMS column)\n"), out);
fputs(_(" -r, --raw display in raw mode\n"), out);
fputs(_(" -t, --time show attach, detach and change times\n"), out);
+ fputs(_(" -y, --shell use column names to be usable as shell variable identifiers\n"), out);
+
fputs(USAGE_SEPARATOR, out);
printf(USAGE_HELP_OPTIONS(26));
if (ctl->noheadings)
scols_table_enable_noheadings(table, 1);
+ if (ctl->shellvar)
+ scols_table_enable_shellvar(table, 1);
switch(ctl->outmode) {
case OUT_NEWLINE:
{ "time", no_argument, NULL, 't' },
{ "time-format", required_argument, NULL, OPT_TIME_FMT },
{ "version", no_argument, NULL, 'V' },
+ { "shell", no_argument, NULL, 'y' },
{NULL, 0, NULL, 0}
};
scols_init_debug(0);
- while ((opt = getopt_long(argc, argv, "bceghi:Jlmno:PqrstV", longopts, NULL)) != -1) {
+ while ((opt = getopt_long(argc, argv, "bceghi:Jlmno:PqrstVy", longopts, NULL)) != -1) {
err_exclusive_options(opt, longopts, excl, excl_st);
case 'c':
show_creat = 1;
break;
+ case 'y':
+ ctl->shellvar = 1;
+ break;
case 'h':
usage();