@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> "ccs" at 70.127.159.246 pasted "csd" (1 line, 2B) at http://sial.org/pbot/17868
<1> hi all
<1> is there any max limit on the command line arguments?
<2> usually, yes.
<1> whatz the upper limit?
<2> depends on the system.
<2> if your system has it: ''getconf ARG_MAX''



<1> getconf ARG_MAX
<1> 1048320
<1> that means?
<2> that means that you can have 1048320 bytes in the arguments, including the command name, actual path to the program, and a null byte between each argument, as well as room for the exported environment.
<1> how can i modify the same/
<2> you cannot.
<1> even if I've root privileges?
<2> perhaps your system permits it. there is no way to get ksh to change it, ksh just obeys it.
<1> i think bash doesn't obey this rule... right?
<1> only ksh has the restriction
<2> it is a system rule, there is nothing any shell can do to avoid it.
<1> but i just found that bash can exceed this limit
<2> *shrug*
<2> i doubt it can. but you aren't saying much so it is hard to say.
<1> ksh has another restriction that any single argument shouldn't exceed 2048 chars?
<1> # perl -e 'print "A" x 102480' |xargs echo
<1> xargs: A single arg was greater than the max arglist size of 2048 characters
<2> that is an xargs issue, not ksh.
<1> oops: thanx for the info
<1> i just ran the following command from ksh, it worked fine
<1> perl -e 'print "A " x 1048321' | xargs echo
<1> how come? my system limit is 1048320
<2> because more than just those 2 million characters need room.
<2> the exported environment, the program name, the full path to the program, a null byte between each argument and environment.
<1> 1048320 means the total bytes shouldnt exceed this value, in this case, the argument has exceeded this value
<2> right.



<1> the command shouldn't work right? as it has overflowed the val
<2> xargs breaks apart the input into chunks that are allowed.
<2> no, "A " 2 million times can be broken into multiple commands -- that is what xargs does.
<2> err, "A " 1 million times.
<1> echo `perl -e 'print "A" x 1048400'`
<1> this also works fine .. it shouldn't right
<1> echo `perl -e 'print "A" x 1048400'` | wc -c
<1> 1048401
<2> since echo is a builtin command it can exceed the limits, because exec is not involved.
<2> $ echo "$(perl -e 'print "a"x1310720')" | wc -c 1310721
<2> hmm, silly paste thingy. the 1310721 was the result of the wc -c.
<2> $ /usr/bin/echo "$(perl -e 'print "a"x1310720')" | wc -c
<2> ksh: /usr/bin/echo: cannot execute [Argument list too long] 0
<1> twkm: cool ... thanx a lot !!!
<2> sure thing.
<1> twkm: i appreciate that ... ur explanation was too good
<2> cool.
<1> whatz the env variable conntrolling history size in ksh?
<1> in bash its HISTSIZE i suppose
<3> howzee, have you tried "man ksh"?
<1> man page suggests the same variable, HISTSIZE
<1> but it is not working
<1> i tried setting the value to 0
<4> hi
<4> please check this very simple script
<4> http://pastebin.ca/67741
<4> even though I have given num -ne -1 instead of $num, it still works - Why?
<4> anyone ?????
<4> any ideas?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #ksh
or
Go to some related logs:

glibc-intermediate FPA error
php script * grabs urls
besific
compiling sharpconstruct ubuntu
IE XMLHTTPRequest Invalid Syntax
gtkterm package in XUBUNTU
error: System has no support for gtk python interface
#gentoo
wmv vlc fedora win32codecs
vnc grey screen damn small linux



Home  |  disclaimer  |  contact  |  submit quotes