All pastes #2101792 Raw Edit

Someone

public text v1 · immutable
#2101792 ·published 2012-01-10 07:38 UTC
rendered paste body
#!/bin/bash

set -o pipefail

head -c 100 /dev/urandom | tr -cd '[:alnum:]' | head -c 10 ; echo -e "\nEXIT=$?"        # exit's 0

head -c 20999 /dev/urandom | tr -cd '[:alnum:]' | head -c 10 ; echo -e "\nEXIT=$?"      # exit's 141      
                                                                                        # WHY?           
echo "you may need to increase 20999 to see the previous command exit 141"

cat /dev/urandom  | tr -cd '[:alnum:]'| head -c 10 ; echo -e "\nEXIT=$?"                # exit's 141