I plan to feed this points to gnuplot to plot it as a graph. I tried plotting the same data with smooth cumulative function in gnuplot, which seems to not return the exact graph that I want.
Thanks for the response. I ended up writing an entire script from scratch to do this dynamically. I think that the code that you have posted needs input for the 1/number_of_entries value each time.
Here is my solution..
#!/bin/bash
count=$(cat sorted1.txt | wc -l)
var=$(echo "1/$count" | bc -l)
holding=$(echo "1/$count" | bc -l)
echo 0 > cdf1.txt
echo 0 >> cdf1.txt
#echo $var
for i in $(eval echo {1..$count})
do
echo $var >> cdf1.txt
var=$(echo "$var+$holding" | bc -l)
done