This repository has been archived by the owner. It is now read-only.
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Adding gnuplot and data files for disaggregation blog post
- Loading branch information
1 parent
c9ab761
commit 3c0c96bc7df96158f8a27168976b0ff354cef4b9
Showing
36 changed files
with
50,715 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,22 @@ | ||
# which column | ||
if [ $# -ne 2 ]; then | ||
echo "tell me file name and col number" | ||
exit 1 | ||
fi | ||
k=$2 | ||
file=$1 | ||
|
||
# sort it | ||
sort --key $k -n $file > $file-sort | ||
|
||
# now we generate CDF | ||
totalLines=$(cat $file-sort | wc -l) | ||
echo "total line numbers: $totalLines" | ||
rm ./xx | ||
for i in `seq 1 100`; | ||
do | ||
lx=$(( $i * $totalLines )) | ||
lxx=$(( $lx / 100 )) # you get the line number here | ||
sed -n "${lxx}p" $file-sort >> ./xx | ||
done | ||
cat ./xx | awk '{print $1,"\t",NR}' > cdf-$file |
Oops, something went wrong.