Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20682

Re: Python as a default shell, replacement of bash, sh, cmd ?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!fu-berlin.de!newsfeed-00.mathworks.com!panix!not-for-mail
From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: Python as a default shell, replacement of bash, sh, cmd ?
Date Wed, 22 Feb 2012 15:31:10 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 32
Message-ID <ji31nu$btj$1@reader1.panix.com> (permalink)
References <24942665.31.1329591482717.JavaMail.geo-discussion-forums@pbux2> <12644c63-c7df-49fb-b3e9-16029057cee3@sk8g2000pbc.googlegroups.com> <20872530.6.1329639403963.JavaMail.geo-discussion-forums@pbt8> <ji1jsf$hrm$1@dont-email.me>
NNTP-Posting-Host dsl.comtrol.com
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Trace reader1.panix.com 1329924670 12211 64.122.56.22 (22 Feb 2012 15:31:10 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Wed, 22 Feb 2012 15:31:10 +0000 (UTC)
User-Agent slrn/pre0.9.9-102 (Linux)
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20682

Show key headers only | View raw


On 2012-02-22, Kyle T. Jones <onexpadREMOVE@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!!

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python as a default shell, replacement of bash, sh, cmd ? SherjilOzair <sherjilozair@gmail.com> - 2012-02-18 10:58 -0800
  Re: Python as a default shell, replacement of bash, sh, cmd ? Jabba Laci <jabba.laci@gmail.com> - 2012-02-18 20:21 +0100
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-18 13:46 -0800
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-18 13:46 -0800
  Re: Python as a default shell, replacement of bash, sh, cmd ? Bryan <bryanjugglercryptographer@yahoo.com> - 2012-02-18 20:05 -0800
    Re: Python as a default shell, replacement of bash, sh, cmd ? SherjilOzair <sherjilozair@gmail.com> - 2012-02-19 00:18 -0800
      Re: Python as a default shell, replacement of bash, sh, cmd ? Terry Reedy <tjreedy@udel.edu> - 2012-02-19 13:28 -0500
    Re: Python as a default shell, replacement of bash, sh, cmd ? SherjilOzair <sherjilozair@gmail.com> - 2012-02-19 00:16 -0800
      Re: Python as a default shell, replacement of bash, sh, cmd ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-19 08:49 +0000
      Re: Python as a default shell, replacement of bash, sh, cmd ? "Kyle T. Jones" <onexpadREMOVE@EVOMERyahoodotyouknow.com> - 2012-02-21 20:28 -0600
        Re: Python as a default shell, replacement of bash, sh, cmd ? Grant Edwards <invalid@invalid.invalid> - 2012-02-22 15:31 +0000
          Re: Python as a default shell, replacement of bash, sh, cmd ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-02-22 22:15 +0000
  Re: Python as a default shell, replacement of bash, sh, cmd ? Michael Torrie <torriem@gmail.com> - 2012-02-19 17:23 -0700
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-19 22:15 -0800
    Re: Python as a default shell, replacement of bash, sh, cmd ? 88888 Dihedral <dihedral88888@googlemail.com> - 2012-02-19 22:15 -0800
  Re: Python as a default shell, replacement of bash, sh, cmd ? Serhiy Storchaka <storchaka@gmail.com> - 2012-02-21 11:15 +0200

csiph-web