Tuesday, November 27, 2012

python program behind proxy


export http_proxy="http://localhost:8118"

All about pip

I was stucked in pip. Just found out that pip is called "pip-python" in RHEL.

 What's more, pip cannot auto detect system proxy settings, manual specify:

 sudo pip sudo pip-python install virtualenv --proxy localhost:8118

Sunday, November 11, 2012

command sort on last column

As you know, the linux sort command is agile, which can sort on column using -k.

However, if we gonna sort on the last column and each row has different number of columns, we can still achieve that with the help of sed.

sed 's/^\(.\+\s\+\)\([0-9]\+ *\)$/\2 \1/'