Skip to content

Instantly share code, notes, and snippets.

@IanVaughan
Created September 17, 2011 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IanVaughan/1224443 to your computer and use it in GitHub Desktop.
Save IanVaughan/1224443 to your computer and use it in GitHub Desktop.
Linux Bash script to record the audio stream for a period of time
#!/bin/bash
FILENAME=$1
HOURS=$2
SECONDS=$((3600 * ${HOURS}))
echo "Recording ${FILENAME} for ${SECONDS} seconds..."
rec -c 2 ${FILENAME}.ogg trim 0 ${SECONDS} #7200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment