News for hackers. Stuff that matters.
Re:Integrated command line math by mfincham on Tuesday July 23, 2013 @02:41PM (#6092045)
A probable improvement on this would be to leave bash out, and just put a python hash bang in the script directly.

I'll leave implementing it as an exercise to the reader. Personally I have found using Guake (http://guake.org/) with IPython as the shell a very nice way of solving this problem.

Re:Integrated command line math by ante_annum on Tuesday July 23, 2013 @02:47PM (#6092091)
An even briefer improvement on this would be to remove the whole script and just alias/function the whole thing.

For example, my .bash_profile contains:

function scrub { ps -ef |grep $1 | grep -v grep | awk '{print $2}' | xargs kill }

mostly because I was too lazy to install pkill, but I can just do `scrub tomcat` and it works.

Also, don't alias a script path. Just add the script to the path.