Skip to content

Convenient shell scripts for everyday use, written in bash, perl, awk, python

Notifications You must be signed in to change notification settings

chen-123/shellscripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shell scripts

Convenient shell scripts for everyday use, written in bash, perl, awk, python.

All scripts print a helpful usage message when used with -h or --help

Bash

  • bash/add-stub-pl.sh

    Insert a script header after the first line of a perl script.

  • bash/add-stub-sh.sh

    Insert a script header after the first line of a shell script.

  • bash/add-usage-sh.sh

    Add a usage() function after the first blank line of a shell script.

  • bash/alert.sh

    Sound the system bell

  • bash/backup.sh

    Archive files under BASE/sources/{daily,weekly,monthly}

  • bash/bak.sh

    Move or copy files and directories with .bak or .YYYYMMDD suffix

  • bash/bzr.sh

    Perform repository operations on a tree of bzr repositories

  • bash/capitalize.sh

    Capitalize words in filenames.

  • bash/col.sh

    Extract the n-th column of stdin

  • bash/cp-replace.sh

    Replace regex patterns in filenames.

  • bash/demoronizer.sh

    Convert non-ascii characters to ascii (rough) equivalents

  • bash/dos2unix.sh

    Remove carriage return from files.

  • bash/download-lj.sh

    Download Linux Journal PDFs from your digital subscription

  • bash/download-lm.sh

    Download Linux Magazine PDFs from your digital subscription

  • bash/extract-icon-from-platter.sh

    Extract an icon image from a platter of icon images.

  • bash/find-recent.sh

    Find and sort files by atime/ctime/mtime

  • bash/flac2mp3.sh

    Convert FLAC files to MP3 using flac and lame

  • bash/git.sh

    Perform repository operations on a tree of Git repositories

  • bash/icons2dim.sh

    Resize icon images to have specified width and height.

  • bash/icons2square.sh

    Pad images with transparency to have equal width and height

  • bash/iconv-filenames.sh

    Convert the encoding of filenames (if possible).

  • bash/id3tag.sh

    Set id3 v2 tag on mp3 files in the current directory and rename nicely.

  • bash/ipod2local.sh

    Import mp3 files from ipod to hard disk.

  • bash/iptables-simple.sh

    Configure a very simple firewall using iptables.

  • bash/lowcase.sh

    Rename files to all lowercase letters.

  • bash/m4a2mp3.sh

    Convert M4A files to MP3 using faad and bladeenc

  • bash/mv-replace.sh

    Replace regex patterns in filenames.

  • bash/my-ip.sh

    Print my local IP address

  • bash/pdf-pages.sh

    Cut out a range of pages from PDF files.

  • bash/rip-audiocd.sh

    Copy titles in an audio CD to wav files in the specified directory.

  • bash/rip-dvd.sh

    Rip a DVD movie into a high quality DIVX file.

  • bash/save-flash-linux.sh

    Copy a flash movie (youtube.com, etc) saved by a browser in /private

  • bash/save-flash-mac.sh

    Copy a flash movie (youtube.com, etc) saved by a browser in /private

  • bash/save-webpage.sh

    Save a webpage and all the files necessary to display properly.

  • bash/screenshot.sh

    Take a screenshot of the entire screen or a window.

  • bash/ssh-authorizeme.sh

    Add a public key to the authorized_keys file on a remote server.

  • bash/ssh-tunnel-keeper.sh

    Create an ssh rtunnel and try to keep it alive as long as possible.

  • bash/svn.sh

    Check out all projects in a Subversion repository into the specified directory.

  • bash/svnadmin.sh

    Subversion repository tool based on svnadmin.

  • bash/sys-vitalbackup-Linux.sh

    Backup most vital system files and most relevant system information.

  • bash/template-html.sh

    Create a standards compliant HTML skeleton.

  • bash/template-perl.sh

    Generate the template of a Bourne shell script that can parse simple parameters.

  • bash/template-sh.sh

    Generate a /bin/sh script template with a simple command line parser.

  • bash/unrar.sh

    Properly unrar files in directories containing spaces in their names.

  • bash/upcase.sh

    Rename files to all uppercase letters.

  • bash/wav2mp3.sh

    Convert WAV files to MP3 using bladeenc or lame

  • bash/wma2mp3.sh

    Convert WAV files to MP3 using mplayer, and bladeenc or lame

Perl

  • perl/FreeBSD.pl

    A package manager for FreeBSD emulating some of the functionality of apt-get.

  • perl/base642ascii.pl

    Convert a Base64 string to ASCII

  • perl/dbi-info.pl

    Print the list of available DBI drivers and data sources.

  • perl/geoip-lookup.pl

    Find the country of a hostname or IP address using Geo::IPfree

Awk

  • awk/avg.awk

    Compute the average of numeric values in the input files or pipe.

  • awk/max.awk

    Find the maximum numeric value in the input files or pipe.

  • awk/min.awk

    Find the minimum numeric value in the input files or pipe.

  • awk/sum.awk

    Compute the sum of numeric values in the input files or pipe.

  • awk/var.awk

    Compute the variance of numeric values in the input files or pipe.

Python

  • python/free.py

    TODO

  • python/paste.py

    merge corresponding or subsequent lines of files

  • python/pwgen.py

    Generate random passwords

  • python/reorder.py

    Add numeric prefix to filenames to match order specified in a list file

  • python/transpose.py

    TODO

  • python/xpath.py

    Test on an XML file an XPATH expression

About

Convenient shell scripts for everyday use, written in bash, perl, awk, python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published