Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/bash
- # this is used in a regex for grep, so escape special chars ( periods )
- MON_SRC=analog-stereo\.monitor
- if [[ -z ${1} ]]; then
- echo -e "\nError: Missing output filename\nUsage: $(basename ${0}) filename.wav\n"
- exit 1
- else
- PA_DEV=$(pacmd list-sources | grep ${MON_SRC} | perl -ne 'print $1 if /\<(.*)\>/')
- echo "Recording from ${PA_DEV} to ${1}"
- parecord -v -d ${PA_DEV} ${1}
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement