shellspells beta

bash

bash [options] [file]

bash (GNU Bourne-Again SHell) is an sh-compatible command language interpreter. It also incorporates useful features from the Korn and C shells. The default shell on GNU/Linux systems.

The conduit for your magic! If you are a command line warrior then this is where you'll spend most of your day.

Scripts

playvids

Play videos in a random order. This script uses the shuf command to randomise a list of videos and then goes through and plays them with VLC

View code
#!/bin/bash
# Play videos in random order
DIR=/mnt/store/photos
LOG=/tmp/playvids.log
VIDLIST=/tmp/vids
RANDLIST=/tmp/RANDLIST

{
  # Generate a list of videos
  find $DIR -name '*.AVI' -print > $VIDLIST

  # Shuffle them
  shuf $VIDLIST > $RANDLIST

  # Play them
  for vid in $(cat $RANDLIST); do
    echo $vid
    vlc -f --control lirc --volume 1024 --play-and-exit $vid
  done
} 2>&1 | tee -a $LOG