Popular Posts
-
Blogs I Follow:
- Victoria Mui - Blog
Close preview
Loading... - Frank Macchia - Allow Me To Be Frank
Close preview
Loading... - Damian Mellin - Daylightz Design
Close preview
Loading... - Greg Wilson - The Third Bit
Close preview
Loading... - Mike Yoo - Living as Minhoon
Close preview
Loading... - Brian Shim - Now & Then
Close preview
Loading... - Stephen Khuu := Steve Khuu
Close preview
Loading... - Sensorial'Org
Close preview
Loading... - Seriously? @Pi/Pi
Close preview
Loading... - Misa - Trails...
Close preview
Loading...
- Victoria Mui - Blog
-
RSS Links
-
Meta
Python Shell Commands, /bin/sh: Syntax error
This semester, Derek and I have been doing some work on Postgres’ buffer management system for my CSC443 Database Systems Technology course. Derek, wrote a nice little Python script that parses various Postgres outputs and does a bit of math on it.
However, when I tried to run his script on my machine, I got an error:
The problem was that the script relied on an
os.system()call execute some shell statements. This script worked fine on the Debian systems at school, but it barfed on my Ubuntu.A series of Google searches led me to this useful thread http://ubuntuforums.org/showthread.php?t=382548
It turns out that the command wasn’t being executed through
bash, but throughshThe fix in the forum post is a bit overkill, the suggestion is to completely delete
sh. I’d rather stick to the safe side and rename sh and then create the sym-link: