Skip to main content
deleted 1 character in body
Source Link
user313992
user313992

The /usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e. getconf ARG_MAX, on my system that'd be 2097152); example:

That's not a shell's limit, but a limit of the OS (of the Linux kernel), specifically of its execve(2) syscall, and caused by the antiquated way in which the command line arguments and environment variables are passed to a started program.

(Notice that that limit also includes the environment variables!).

A skim of man bash dash doesn't seem to say much about this advantage of builtin printf. Where is it documented? Do builtin printfs have an argument list length, (e.g. bash), and if so, what is it?

Since shell built-ins don't go through execve(2) they don't have to have any limit like that. Modern shell usually don't use fixed sizedsize buffers and such, so the limit is usually imposed by the amount of available memory and the layout of the virtual address space -- ie it's unlimited for all intents and purposes.

The /usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e. getconf ARG_MAX, on my system that'd be 2097152); example:

That's not a shell's limit, but a limit of the OS (of the Linux kernel), specifically of its execve(2) syscall, and caused by the antiquated way in which the command line arguments and environment variables are passed to a started program.

(Notice that that limit also includes the environment variables!).

A skim of man bash dash doesn't seem to say much about this advantage of builtin printf. Where is it documented? Do builtin printfs have an argument list length, (e.g. bash), and if so, what is it?

Since shell built-ins don't go through execve(2) they don't have to have any limit like that. Modern shell usually don't use fixed sized buffers and such, so the limit is usually imposed by the amount of available memory and the layout of the virtual address space -- ie it's unlimited for all intents and purposes.

The /usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e. getconf ARG_MAX, on my system that'd be 2097152); example:

That's not a shell's limit, but a limit of the OS (of the Linux kernel), specifically of its execve(2) syscall, and caused by the antiquated way in which the command line arguments and environment variables are passed to a started program.

(Notice that that limit also includes the environment variables!).

A skim of man bash dash doesn't seem to say much about this advantage of builtin printf. Where is it documented? Do builtin printfs have an argument list length, (e.g. bash), and if so, what is it?

Since shell built-ins don't go through execve(2) they don't have to have any limit like that. Modern shell usually don't use fixed size buffers and such, so the limit is usually imposed by the amount of available memory and the layout of the virtual address space -- ie it's unlimited for all intents and purposes.

added 42 characters in body
Source Link
user313992
user313992

The /usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e. getconf ARG_MAX, on my system that'd be 2097152); example:

That's not a shell's limit, but a limit of the OS (of the Linux kernel), specifically of its execve(2) syscall, and caused by the antiquated way in which the command line arguments and environment variables are passed to a started program.

(Notice that that limit also includes the environment variables!).

A skim of man bash dash doesn't seem to say much about this advantage of builtin printf. Where is it documented? Do builtin printfs have an argument list length, (e.g. bash), and if so, what is it?

Since shell built-ins don't go through execve(2) they don't have to have any limit like that. Modern shell usually don't use fixed sized buffers and such, so the limit is usually imposed by the amount of available memory and the layout of the virtual address space -- ie it's unlimited for all intents and purposes.

The /usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e. getconf ARG_MAX, on my system that'd be 2097152); example:

That's not a shell's limit, but a limit of the OS (of the Linux kernel), specifically of its execve(2) syscall, and caused by the antiquated way in which the command line arguments and environment variables are passed to a started program.

(Notice that that limit also includes the environment variables!).

A skim of man bash dash doesn't seem to say much about this advantage of builtin printf. Where is it documented? Do builtin printfs have an argument list length, (e.g. bash), and if so, what is it?

Since shell built-ins don't go through execve(2) they don't have to have any limit like that. Modern shell usually don't use fixed sized buffers and such, so the limit is usually imposed by the amount of available memory and the layout of the virtual address space.

The /usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e. getconf ARG_MAX, on my system that'd be 2097152); example:

That's not a shell's limit, but a limit of the OS (of the Linux kernel), specifically of its execve(2) syscall, and caused by the antiquated way in which the command line arguments and environment variables are passed to a started program.

(Notice that that limit also includes the environment variables!).

A skim of man bash dash doesn't seem to say much about this advantage of builtin printf. Where is it documented? Do builtin printfs have an argument list length, (e.g. bash), and if so, what is it?

Since shell built-ins don't go through execve(2) they don't have to have any limit like that. Modern shell usually don't use fixed sized buffers and such, so the limit is usually imposed by the amount of available memory and the layout of the virtual address space -- ie it's unlimited for all intents and purposes.

Source Link
user313992
user313992

The /usr/bin/printf util argument list length is limited to the shell's maximum command line length, (i.e. getconf ARG_MAX, on my system that'd be 2097152); example:

That's not a shell's limit, but a limit of the OS (of the Linux kernel), specifically of its execve(2) syscall, and caused by the antiquated way in which the command line arguments and environment variables are passed to a started program.

(Notice that that limit also includes the environment variables!).

A skim of man bash dash doesn't seem to say much about this advantage of builtin printf. Where is it documented? Do builtin printfs have an argument list length, (e.g. bash), and if so, what is it?

Since shell built-ins don't go through execve(2) they don't have to have any limit like that. Modern shell usually don't use fixed sized buffers and such, so the limit is usually imposed by the amount of available memory and the layout of the virtual address space.