Sponsored Content
Top Forums Shell Programming and Scripting Maximum command length in bourne shell Post 302365861 by vgersh99 on Wednesday 28th of October 2009 08:19:03 AM
Old 10-28-2009
Code:
#!/bin/ksh

# The value of the constant ARG_MAX defines how long an argument list your
# kernel can take on the command line before it chokes. Here's a script to
# find out the value of it:

        # Print out the system's architecture
        uname -rms              # or uname -a

        # Let the C preprocessor read in the system's limits from limits.h
        # and then expand the macro ARG_MAX
        # Filter out excess output (there will be some line number information
        # and a gadzillion empty lines)
        #
        # On some gcc systems, I have been unable to find a working cpp.
        # You can use gcc -E - <:<:HERE | tail -1 in that case.

cpp <<HERE | tail -1    # Only the last line is interesting
#include <limits.h>
ARG_MAX
HERE

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Maximum file name length

Hi folks, Can anybody tell me whether there is any limit on the file name length and directory name length in UNIX. (4 Replies)
Discussion started by: rkkiran
4 Replies

2. UNIX for Dummies Questions & Answers

Maximum Command Length for Korn shell

What is the maximum size of a command which can be given in telnet command prompt in unixfor Korn shell? (2 Replies)
Discussion started by: miltony
2 Replies

3. UNIX for Dummies Questions & Answers

Maximum Command Length

What is the maximum size of a command which can be given in telnet command prompt in unix? (2 Replies)
Discussion started by: miltony
2 Replies

4. UNIX for Dummies Questions & Answers

what is the maximum length of th os-command line in Unix.

Hi All, I didn't find any thread that match this question so I hope it's not redundant. I am totally new to Unix. I want to know what is the maximum length of the os-commandline in Unix. Will it cause any problem if I run any application whose total path length is much longer than 256... (2 Replies)
Discussion started by: kumardesai
2 Replies

5. UNIX for Dummies Questions & Answers

Maximum length of a path given as an argument to a shell script

hi, I am using solaris10. I have to write a bourne shell script, which copies files for the said destination path which is passed as an argument to the script. it looks like this myscript.sh /var/test -->destination path now i would like to know what is the maximum length i can... (3 Replies)
Discussion started by: raghu.amilineni
3 Replies

6. Shell Programming and Scripting

what is the maximum length of a unix shell variable which can be can passed to plsql

what is the maximum length of a unix shell variable which can be can passed to plsql variable:( (1 Reply)
Discussion started by: alokjyotibal
1 Replies

7. Shell Programming and Scripting

Is there any command in the Bourne shell?

Hi, The problem I have is that I want to create a list of folders whose names are read from a text file but the file names are in decimal. Each letter consists of an octet and the end of the folder name is defined by the white space character (0032) For example, we have in the text... (2 Replies)
Discussion started by: Gengis-Kahn
2 Replies

8. AIX

Alias Command in Bourne Shell

Hi My Unix sever is AIX 5.3. My Login shell ( using echo $SHELL) is /bin/sh implying it is a Bourne Shell. My Question is that i am still able to use Alias command to create/retrieve aliases. I have read in several sites on Unix online that the Bourne Shell does not support Aliases but... (12 Replies)
Discussion started by: pchegoor
12 Replies

9. Shell Programming and Scripting

Is there a maximum length for a shell script command?

Is there a maximum length for a shell script command? How can I detect that in my OS? For example, if I have something like: command A | command B | command C | awk '{print $1 $2 $3 $4 $5}' then can we break the commands and also the arguments inside awk ? Thanks (11 Replies)
Discussion started by: hbar
11 Replies

10. Shell Programming and Scripting

Maximum length of a string

good friends days I would love to know if I can help you know the length of a string example: cadena= "cual es mi largo" echo "cadena : $cadena# cadena :16 (7 Replies)
Discussion started by: tricampeon81
7 Replies
FAUCC(1)																  FAUCC(1)

NAME
faucc - C compiler generating Intel code for 16 bit/32 bit CPUs. SYNOPSIS
faucc [ -B path ] [ -D MACRO [=def]] [ -E ] [ -I path ] [ -L path ] [ -MD ] [-MF file ] [ -MP ] [ -MT target ] [ -O level ] [ -S ] [ -T script ] [ -U macro ] [ -Wl,arg ] [ -Xlinker arg ] [ -b arch ] [ -c ] [ -f arg ] [ -m arch ] [ -nostdlib ] [ -o output ] [ -print-lib-faucc-file-name ] [ --freestanding ] [ --no-stack-protector ] { file ...} DESCRIPTION
faucc is a C compiler, that can generate Intel 16 bit or 32 bit Code. OPTIONS
faucc tries to mimic the options of gcc. A number of options will be passed to the C preprocessor cpp or to the linker (done via a call to the c-compiler gcc) in unmodified form. -B path Override the directory prefix where cc1 is looked up with path. -D MACRO, -D MACRO=def Define MACRO with the optional initial definition def. If def is omitted, it defaults to 1. -E Only perform preprocessing, but do not run the compiler. -I path Add path to the include path in which header files are searched. -L path Add path to the library search path, in which the linker will look for libraries. -MD Output dependency information while preprocessing. -MF, file Output dependency information while preprocessing to file. -MP, When the preprocessor should output dependency information, it will generate PHONY targets for each dependency. -MT target When the preprocessor should output dependency information, use target as the dependency rule target. -O level Currently ignored. -S Output assembly code. -T script Use script as linker script. -U macro Undefine a previously defined macro. -Wl,arg, -Xlinker arg Pass arg to the linker. -b arch Generate code for arch (either i286 or i386) -c Perform compilation, but do not link. -f arg Pass code generation argument arg to the compiler. See the cc1 man page for possible arguments. -m arch Currently ignored. -nostdlib With this option, the linker will only search for libraries that are passed as command line arguments. -o file Write output to file. -print-libfaucc-file-name Print the full path of the internal compiler library libfaucc.a. -static Perform static linking. --freestanding, --no-stack-protector Currently ignored. EXAMPLES
faucc -c hello-world.c -o hello-world.o Compile the program hello-world.c and output the object as hello-wolrd.o. faucc -S -b i286 -o test.s test.c Compile the program test.c to 16 bit code and output the assembly listing to test.s, but do not assemble or link the result yet. SEE ALSO
cc1(1) , cpp(1) , gcc(1) , ld(1) CONTACT
Please report all bugs to FAUcc Team <info@faumachine.org>. FAUcc Homepage [1]. AUTHOR
FAUcc Team COPYRIGHT
Copyright (C) 2009 FAUcc Team. Developed at Friedrich Alexander University Erlangen-Nuremberg. FAUcc comes with ABSOLUTELY NO WARRANTY. FAUcc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See COPYING for details. NOTES
1. FAUcc Homepage http://www.faumachine.org FAUcc Team 03/08/2009 FAUCC(1)
All times are GMT -4. The time now is 01:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy