Free Shell Scripts

Contents

License
License terms
Downloading
How to download
xbiff.py
mail notifier
cdm
cd from menu
smv
safe mv command
SFTP
file transfer with SSH
jpgMv
rename photos to date and time
toZen
build playlists on Creative Zen mp3 players
toVibe
put MP3s onto Philips GoGear Vibe mp3 players

License

All the programs on this page contain the following license:

Copyright (C) 2014 Peter Scott - p.scott@shu.ac.uk This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

By downloading a script you are accepting the terms of the GNU General Public License for the script.

back to contents

Downloading

The scripts often contain tabs or other odd characters so they cannot be pasted. You have to do a "save link target as" to a directory on your PATH and make the script executable. If you are using an iPad, or merely want to look at a script you can use the "(see it)" link by the download link.

Alternatively, you can get them or see them on my github page.

back to contents

xbiff.py -- mail notifier

xbiff.py (see it) watches an IMAP account and alerts you with a beep and a very small pop-up when new mail arrives. It takes up no permanent screen space. Here is a snapshot of a corner of my workspace showing the pop-up:
xbiff.py message

xbiff.py is much simpler than gnubiff and handles lost connections more sensibly. I start it in my .bash_profile and stop it from my .bash_logout.

back to contents

cdm -- cd from menu

cdm.sh (see it) displays a menu like this:
menu in xterm
and lets you choose the directory you want by name or by number. (In the screenshot, the reply has been copied -- not typed!) Directories can be omitted from the menu, or added, by setting up a couple of hidden files.

back to contents

smv -- safe mv command

smv (see it) is better than the standard mv command's --no-clobber option because it gives an error message when it doesn't move a requested file.

SFTP -- transfer and compare files on remote systems with SSH

SFTP (see it) is a convenient front-end to the sftp command; it can be used from the command line to move files about or compare them, or it can be called from cron or from any shell script. SFTP uses the batch mode of sftp but you don't have the hassle of setting up a batch file or reading all the output. Clearly, it is only useful if you have set up password-less logins.

SFTP works with SSH.com SSH, Open-SSH and Sun's dumbed-down version of Open-SSH.

back to contents

jpgMv -- rename photos to date and time

jpgMv (see it) uses jpgDate (see it) to rename a collection of jpg files so they have names like 2005-10-13_00.jpg or 2005-10-13+15-15-46_00.jpg. jpgMv is particularly useful when merging many photos into one directory; it does not overwrite existing files. jpgDate uses the identify command from ImageMagic.

back to contents

toZen -- build playlists on Creative Zen mp3 players

I used to love these mp3 players! However, my latest is a huge disappointment. Here is a review.

There are two versions of toZen: one for the newer Zen Style M100 (see it) and one for the older Zen Style 100 (see it). Both take a directory of MP3s and turn it into a playlist on a mounted Creative Zen mp3 player. They might work unchanged on other mp3 players.

back to contents

toVibe -- put MP3s onto Philips GoGear Vibe mp3 players

toVibe (see it). takes a directory of MP3s and puts it onto a mounted Philips GoGear Vibe mp3 player. It might work unchanged on other mp3 players.


Valid XHTML 1.0! Peter's Home Page Valid CSS!