Or a better method of changing the default shell for posterity's sake: $ sudo dpkg-reconfigure dash Then select "No" (Don't install dash). This updates the symlinks accordingly: Removing `diversion of /bin/sh to /bin/sh.distrib by dash' Adding `diversion of /bin/sh to /bin/sh.distrib by bash' Removing `diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash' Adding `diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash' -- Jake Biesinger Graduate Student Xie Lab, UC Irvine (949) 231-7587 On Tue, Aug 3, 2010 at 3:39 PM, Jacob Biesinger <jake.biesinger@uci.edu> wrote:
Well would you look a that. $ ls -l /bin/sh lrwxrwxrwx 1 root root 4 2010-05-28 12:07 /bin/sh -> dash
I assumed having bash set in /etc/passwd was enough-- I guess that's only for login shells? This also explains why I've always had trouble starting galaxy --> `sh run.sh` would not have environment variables, etc so I always did `bash run.sh` After: $ sudo rm /bin/sh $ sudo ln -s /bin/bash /bin/sh
Things work wonderfully. Thanks for that. Perhaps there should be a disclaimer on the wiki somewhere? I imagine Ubuntu is fairly large portion of galaxy's target audience, and it sure can cause funny errors... -- Jake Biesinger Graduate Student Xie Lab, UC Irvine (949) 231-7587
On Tue, Aug 3, 2010 at 3:30 PM, Assaf Gordon <gordon@cshl.edu> wrote:
I don't think so. It actually shows that your "sh" is not "bash".
run: $ ls -l /bin/sh
and see if you get: /bin/sh -> bash or /bin/sh -> dash
Jacob Biesinger wrote, On 08/03/2010 06:27 PM:
No, my default shell (listed in /etc/passwd) is definitely /bin/bash and I can run the sort command just fine from the command line: $ sort -f -t $'\t' -k1,1 -k2,2n -o /home/wbiesing/galaxy_dist/database/files/000/dataset_190.dat /home/wbiesing/galaxy_dist/database/files/000/dataset_171.dat
Though running just sh, the command fails: $ sh $ sort -f -t $'\t' -k1,1 -k2,2n -o /home/wbiesing/galaxy_dist/database/files/000/dataset_190.dat /home/wbiesing/galaxy_dist/database/files/000/dataset_171.dat sort: multi-character tab `$\\t'
Seems like python's os.system(...) is the weak link. -- Jake Biesinger Graduate Student Xie Lab, UC Irvine (949) 231-7587
On Tue, Aug 3, 2010 at 3:16 PM, Assaf Gordon <gordon@cshl.edu> wrote:
One thing to try:
see if your shell is 'dash' (which is the default is recent Ubuntus) and switch it to 'bash' . Make sure to change not only your currently running shell, but also the "/bin/sh" link .
"dash" does not respect the $'\t' trick .
-gordon
Jacob Biesinger wrote, On 08/03/2010 06:01 PM:
Hi! On my local galaxy_dist, doing a simple sort on a bed file is failing. I think the culprit is a tab expansion of the system call on line 42 of tools/filters/sorter.py.
The Galaxy command that is being run is: python /home/wbiesing/galaxy_dist/tools/filters/sorter.py --input=/home/wbiesing/galaxy_dist/database/files/000/dataset_171.dat --out_file1=/home/wbiesing/galaxy_dist/database/files/000/dataset_190.dat --column=1 --style=alpha --order=DESC 2 num DESC
and the stderr output from galaxy is: sort: multi-character tab `$\t'
I can repro the system call within python: In [1]: import os In [3]: cmd = "sort -f -t $'\t' -k1,1 -k2,2n -o /home/wbiesing/galaxy_dist/database/files/000/dataset_190.dat /home/wbiesing/galaxy_dist/database/files/000/dataset_171.dat" In [5]: os.system(cmd) sort: multi-character tab `$\t' Out[5]: 512
Running python2.6.5 with recent co of galaxy_dist. Ubuntu 10.04 x86_64.
-- Jake Biesinger Graduate Student Xie Lab, UC Irvine (949) 231-7587
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev