pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

Bash pastebin - collaborative debugging tool View Help


Posted by smok on Sun 12 Apr 23:20 (modification of post by view diff)
report abuse | download | new post

  1. #!/bin/sh
  2.  
  3. # Simple FLAC to MP3 converter
  4. # Requires 'flac' and 'lame' packages
  5. # Author: smok (http://smok.zoxt.net/)
  6. # Save it as ~/flac2mp3.sh, chmod +x it, and call from direcory with *.flac files.
  7.  
  8. for ffile in *.flac;
  9. do
  10.         ARTIST=`metaflac "$ffile" --show-tag=ARTIST | sed s/.*=//g`
  11.         TITLE=`metaflac "$ffile" --show-tag=TITLE | sed s/.*=//g`
  12.         ALBUM=`metaflac "$ffile" --show-tag=ALBUM | sed s/.*=//g`
  13.         GENRE=`metaflac "$ffile" --show-tag=GENRE | sed s/.*=//g`
  14.         TRACKNUMBER=`metaflac "$ffile" --show-tag=TRACKNUMBER | sed s/.*=//g`
  15.         DATE=`metaflac "$ffile" --show-tag=DATE | sed s/.*=//g`
  16.         flac -dc "$ffile" | lame --quiet -b 320 --tt "$TITLE" --ta "$ARTIST" --tl "$ALBUM" --tn "$TRACKNUMBER" --tg "$GENRE" --ty "$DATE" - "`echo "$ffile" | sed s/\.flac$/\.mp3/g`"
  17. done

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post