About Me
Hi, I’m Rob McColl. I’m a Research Scientist at Georgia Tech Research Institute in the Innovative Computing Group of the Cyber Technology and Information Security Lab. I'm also a part-time PhD student in computer engineering at Georgia Tech under Professor David Bader in the High Performance Computing lab I’m interested in high performance computing architectures, parallel computing, exascale computing, and HPC applications (specifically graph theory apps). I live in Midtown Atlanta with my beautiful and intelligent wife Jean (she's the one on the right). I like music, movies, TV, photography, programming, games, dogs, the outdoors, and jogging when I get around to it.Contact Info
robert.c.mccoll@gmail.com
rmccoll3@gatech.edu
rob@robmccoll.com
robert.mccoll@gtri.gatech.edu(205)422-0909
44 Peachtree Pl NW
Unit 1426
Atlanta, GA 30309Search
Tags
ADAMS android apps Atlanta backup bash C code Engadget facebook graphs Hack a Day hipster ifttt IKEA Hackers Instagram Java Lifehacker Linux Mac Obscure Sound - Indie Music Blog PHD Comics programming Python rsync Saturday Morning Breakfast Cereal (updated daily) Scala Shared from Reader SMISC status updates STINGER SWIG sync TechHowTos theme tweets twitter unison Unix weather wordpress xkcd.comSubscribe
Bash Script: Histogram
Second bash script of the day! This one will histogram the field of a given CSV file numerically. Optionally, you can specify which field and a precision (which is really just a number of characters, not truly a precision).
histogram() {
if [ $# -lt 1 ]
then
echo "Usage: histogram [field] [precision]"
return 0
fi
field=1
if [ $# -gt 1 ]
then
field=$2
fi
if [ $# -gt 2 ]
then
precision="."
for i in `seq 1 1 $3`
do
precision=$precision.
done
cat $1 | sort -k $field -n -t ',' | cut -d ',' -f $field | sed -e "s/\($precision\).*/\1/" | uniq -c
else
cat $1 | sort -k $field -n -t ',' | cut -d ',' -f $field | uniq -c
fi
}
Posted in Uncategorized
Leave a comment
Bash Script: MemUse
Quick useful function to get all of the memory in use by a process or set of processes from a bash prompt:
memuse() {
arr=`ps aux | grep -E $1 | grep -v grep | sed -e 's/[^ \t]*[ \t]*[^ \t]*[ \t]*[^ \t]*[ \t]*//' | sed -e 's/[ \t].*//'`
sum=0
for i in $arr
do
sum=$(echo "$sum + $i" | bc)
done
echo $sum
}











