Language Selection

English French German Italian Portuguese Spanish

With iterpipes, python is ready to replace bash for scripting. Really.

Filed under
Software

This has been a pet peeve of mine for years: programming shell scripts suck. They are ugly and error prone. The only reason why we still do it? There is no real replacement.

Or at least that was the case, until today I met iterpipes at python.reddit.com

Iterpipes is "A library for running shell pipelines using shell-like syntax" and guess what? It's brilliant.

Here's an example from its PYPI page:

# Total lines in *.py files under /path/to/dir,
# use safe shell parameters formatting:

>>> total = cmd(
... 'find {} -name {} -print0 | xargs -0 wc -l | tail -1 | awk {}',
... '/path/to/dir', '\*.py', '{print $1}')
>>> run(total | strip() | join | int)
315

Here's how that would look in shell:




More in Tux Machines

Opera 27 Stable Web Browser Released With Tab Preview Back, Install In Ubuntu, Linux Mint And Others ubuntu Derivatives


opera 27 stable web browser released for install Linux mint/Ubuntu

Today Opera team released Opera 27 version with couple of major changes and with lots of fixes. This is the first stable release of 2015. Opera keeps on coming with beta releases that have several fixes. Although the beta versions were also good and can be used without any problems. This one is the stable release of Opera Web Browser containing two major changes and lots of fixes. Lets see at the changes in this release.

 
 
 
 
 
 
 

 

Linux Kernel 3.18.4 Stable Released, Install In Ubuntu/Linux Mint


Linux Kernel 3.18.4 Stable Released, Install In Ubuntu/Linux Mint

Linux Kernel 3.18.4 Stable is released and can be installed or updated in Ubuntu Vivid Vervet, Utopic Unicorn, Trusty Tahr and Linux Mint Rebecca and Qiana.
 
 
 
 
 
 

Read at LinuxAndUbuntu