tonybaldwin | blog

non compos mentis

mv screenshots

leave a 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 27, 2011 at 1:54 pm

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: