I have tried this shell script on a SUSE 10 server, kernel 2.6.16.60, ext3 filesystem.
The script has a line like this:
cat file | awk '{print $1" "$2" "$3}' | sort -n > result
The file's size is about 3.2G, and I get the following error message: File size limit exceeded.
In this shell, ulimit -f is unlimited.
After I change script into this:
cat file | awk '{print $1" "$2" "$3}' >tmp
sort -n tmp > result
the problem is gone.
I don't know why, can anyone help me with an explanation?
awk '{print $1" "$2" "$3}' file | sort -n > result. How much RAM & swap do you have? 64-bit or 32-bit system? – Craig Sanders Sep 20 '12 at 11:08