Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15273

ulimit call lists invalid options

From L A Walsh <bash@tlinx.org>
Newsgroups gnu.bash.bug
Subject ulimit call lists invalid options
Date 2019-07-29 19:57 -0700
Message-ID <mailman.218.1564455468.1985.bug-bash@gnu.org> (permalink)
References <5D3FB223.5000601@tlinx.org>

Show all headers | View raw


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]

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

ulimit call lists invalid options L A Walsh <bash@tlinx.org> - 2019-07-29 19:57 -0700

csiph-web