![](/img/trans.png)
[英]Linux:How to pass command line argument to an command line argument that is being passed to a script?
[英]Maximum length of command line argument that can be passed to SQL*Plus?
我从 Linux C Shell 调用 SQL*Plus:
sqlplus username/password @file.sql var1 var2 var3
如果我将一个字符串作为var1
传递,这个字符串可以有多长?
它是由操作系统管理的吗? 在这种情况下:
Linux version 2.6.9-100.ELsmp (mockbuild@x86-010.build.bos.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)) #1 SMP Tue Feb 1 12:17:32 EST 2011
更新:实证测试产生以下结果:
我想我会使用sqlldr
来克服这个问题。
尝试使用: xargs --show-limits </dev/null
Your environment variables take up 2446 bytes
POSIX upper limit on argument length (this system): 2092658
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2090212
Size of command buffer we are actually using: 131072
每个参数没有限制,而是整个命令行长度的总数。 在我的系统 (Fedora 15/zsh) 中,它更接近 2Mb。 (第 4 行)。
我遇到了“您的内核在窒息之前可以在命令行上使用多长时间的参数列表?”:
getconf ARG_MAX
这在我的系统上给出了以下内容:
131072
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.