cristina-abad / vrodriguez

Code and documentation generated by Victor Rodriguez during his Research Project
0 stars 1 forks source link

generate_cdf.sh #6

Open cristina-abad opened 8 years ago

cristina-abad commented 8 years ago

The current version of generate_cdf.sh does not do any input validation, does not print error messages, etc. The code should be augmented so that it can be used by other people. This includes:

cristina-abad commented 8 years ago

El contenido de generate_cdf.sh es:

FNAME=$1

SUM=cat $FNAME | awk '{s+=$2}; END{print s}'

echo $SUM

cat $FNAME | awk -v sum=$SUM '{p=$2/sum; c+=p; print $1, $2, p, c}'