bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ulimit call lists invalid options


From: L A Walsh
Subject: ulimit call lists invalid options
Date: Mon, 29 Jul 2019 19:57:39 -0700
User-agent: Thunderbird

in bash 4.4.12,
giving an invalid option to ulimit gives a usage:
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
-SH are for Soft/Hard, so they don't count and -a is for all,
so skipping the first 4, the rest:
but the rest:

ops=$(ulimit -h |& perl -ne 'm{\[([^\]]++)\]} && print "$1\n"')
ops=${ops:4}
echo ops=$ops

for ((i=0; i<${#ops};++i));do
op=${ops:i:1}
out=$(echo "-$op: $(ulimit -$op 2>&1)")
((${#out}>30)) && echo "$out"
done
----
bcdefiklmnpqrstuvxPT
-b: -bash: ulimit: -b: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
-k: -bash: ulimit: -k: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
-P: -bash: ulimit: -P: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]
-T: -bash: ulimit: -T: invalid option
ulimit: usage: ulimit [-SHabcdefiklmnpqrstuvxPT] [limit]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]