by AstroChimpHam · 11y ago · 0 comments
Even if this thing can execute unmodified bash scripts (can it?), it seems to me that would be missing the point, which is to avoid the horror of writing complex bash scripts. When I start writing something in bash, because of those few things it makes so easy (e.g. running subprocesses), I usually regret it as the script grows. If xonsh can make those things just as easy, every script can be written in the right language – which is of course Python :) – from the start.
$ ls='foo'
$ cat test.sh
#!/bin/bash
ls ~
$ print(ls)
foo
$ ./test.sh
bin C:\nppdf32Log\debuglog.txt foo initrd.img.old lost+found opt run sys var
boot dev home lib media proc sbin tmp vmlinuz
cdrom etc initrd.img lib64 mnt root srv usr vmlinuz.old