Why is the maximum allowed parameters for a shell script (for example, run with the terminal) 65535? Why not a different number? Why so… huge?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
65535 happens to be 216 – 1, which is the maximum number than can be represented in an unsigned 16-bit integer. At the time the software was designed, that was probably close enough to “infinity” for all practical purposes. Today, with 64-bit machines on every desktop, it seems quaintly small, yet still far more than you would ever use for a shell script.