Does bash shell parameter expansion run the risk of overflowing command line buffer?
In a bash shell, does parameter expansion happen on the command line or in within the bash processing?
I have a line in a shell that contains:
chmod -x $(find $BASE_DIR/ -type f |tee $BASE_DIR/FileManifest)
and FileManifest turns out to be 32K in length.
I changed it to be:
find $BASE_DIR/ -type f |tee $BASE_DIR/FileManifest| while read file; do chmod -x $file; done
because I was concerned the parameter expansion may cause buffer overflow.
Was I wrong to be concerned?
Dave
Last edited by david1941; 04-28-2009 at 09:56 PM.
Reason: premature posting while attempting to insert code tags
|