Unix shell

Latest

  • Timed command-line screenshots

    by 
    Erica Sadun
    Erica Sadun
    05.20.2013

    A TUAW staffer recently asked if there were a way to snapshot the exact same region of the screen over and over at timed intervals without buying third-party software. There is, but it depends on your comfort with the command line. If you're experienced in Unix scripting, read on. If not, you may want to investigate standalone screen-capture apps instead. I pointed him to /usr/sbin/screencapture. This built-in OS X utility allows you to specify a screen region to capture. For example, to capture a 50x200 rectangle starting at the point 200, 200, you'd say: % /usr/sbin/screencapture -R"200,200,50,200" ~/Desktop/foo.png You can easily apply a Unix shell script to create numbered output files. Unix commands will also enable you to sleep and repeat the capture requests over time. The utility is Retina-ready. Since it captures in points (and not pixels), the results are twice as big in each dimension when run on Retina systems.

  • The "Lost" prompt

    by 
    Erica Sadun
    Erica Sadun
    12.07.2006

    Blogger David Winter has a posted a cute how-to showing you how to change the prompt in your terminal to the ">:" used in Lost. Basically, you update your .zprofile or .bashrc or .kshrc to include the line export PS1=">: ". Me? I'm a csh weenie. I'd have to use set prompt=">: " to get the same effect. (The same thing applies for tcsh users.) Winter also includes instructions on how to get the green-on-black color settings used in the program. 4 8 15 16 23 42 and all that.