tonybaldwin | blog

non compos mentis

mv screenshots pix/screenshots

with one comment

Screenshot pictures tend to pile up in my /home, so I wrote this:

#!/bin/bash

# move pix or die, damn it

if [ ! -f *.jpg ]
then
echo no pix d00d
exit
else
echo THESE
ls -1 *.jpg
echo are ALL pix, d00d.
for i in $(ls *.jpg)
do
mv $i pix/screenshots
echo I just moved $i to the screenshots dir
done
echo all done d00d
fi
exit

Advertisements

Written by tonybaldwin

January 26, 2011 at 5:12 pm

Posted in free software, hacking

Tagged with , ,

One Response

Subscribe to comments with RSS.

  1. […] This post was mentioned on Twitter by feedworld, tony baldwin. tony baldwin said: mv screenshots pix/screenshots http://goo.gl/fb/Kd7gS #freesoftware #hacking #bash #bashscript #script […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: