Python as a default shell, replacement of bash, sh, cmd ?
Grant Edwards
invalid at invalid.invalid
Wed Feb 22 10:31:10 EST 2012
On 2012-02-22, Kyle T. Jones <onexpadREMOVE at EVOMERyahoodotyouknow.com> wrote:
> On 2/19/12 2:16 AM, SherjilOzair wrote:
>> Well, if not modify python itself, I was thinking of making another shell, which borrows a lot from python, something like merging bash and python. such that I can do `cd ~/Desktop/dev` and `for i in open('file.txt'): print i` at the some shell. This I think would be VERY useful.
>>
>
> That's an awful lot of key mashing just to replace 'cat file.txt'
No kidding. And how much python would it take to do "less file.txt"?
> for i in big small upper lower ; do for j in conf bin log ; do chmod
> 2755 /home/me/$i/$j ; done ; done
chmod 2755 /home/me/{big,small,upper,lower}/{conf,bin,log}
> cat data.log | grep Error | awk -F, '{print $5, $1, $2,}' | sort
awk -F, '/Error/ {print $5, $1, $2}' data.log | sort
;)
Any decent modern shell (e.g. Bash) is a stunningly powerful
environment aimed at solving a certain sort of problems in a certain
way. Python is aimed at solving a more general set of problems in an
entirely different way.
Yes, you can drive a nail with a screwdriver if you try hard enough
long enough, but it's still a bad idea.
--
Grant Edwards grant.b.edwards Yow! FOOLED you! Absorb
at EGO SHATTERING impulse
gmail.com rays, polyester poltroon!!
More information about the Python-list
mailing list