back
1 comments
Wait, what is the syntax for this? I can't do `len(!ls)`?
No, `!command` only work on assignment. Please read http://ipython.readthedocs.io/en/stable/interactive/tutorial...

See tutos like https://www.youtube.com/watch?v=xe_ATRmw0KM , most of what works in the notebook work in IPython.

But yes you can do things like:

    files = ! ls   *.txt

    for name in files:
        with open(name) as f:
            if 'Content-Type: text/x-rst' in f.read():
                !git mv {name} {name[:-3]}rst