Back: Sh Implementation
Forward: Magic Numbers
 
FastBack: Environment
Up: Sh Implementation
FastForward: Environment
Top: Autoconf, Automake, and Libtool
Contents: Table of Contents
Index: Index
About: About this document

22.2.1 Size Limitations

Quite a lot of the Unix vendor implementations of the Bourne shell have a fixed buffer for storing command lines, as small as 512 characters in the worst cases. You may have an error akin to this:

 
$ ls -d /usr/bin/* | wc -l
sh: error: line too long

Notice that the limit applies to the expanded command line, not just the characters typed in for the line. A portable way to write this would be:

 
$ ( cd /usr/bin && ls | wc -l )
   1556


This document was generated by Gary V. Vaughan on February, 8 2006 using texi2html