An introduction

This is a semi-public place to dump text too flimsy to even become a blog post. I wouldn't recommend reading it unless you have a lot of time to waste. You'd be better off at my livejournal. I also have another blog, and write most of the French journal summaries at the Eurozine Review.

Why do I clutter up the internet with this stuff at all? Mainly because I'm trying to get into the habit of displaying as much as possible of what I'm doing in public. Also, Blogger is a decent interface for a notebook

Tuesday, May 10, 2011

Quickly creating a shell script

Suppose you want to create and run a short script. It's often faster not to bother opening up a text editor. Instead, use shell history to write a file, then chmod and execute it:

$ cat > /tmp/
#!/usr/bin/env python
print('hello world')
$ chmod a+x !$
chmod a+x /tmp/
$ !$
hello world

No comments:

Post a Comment