This script uses arecord to record sound passing into a USB soundcard.
Connect red and green LED's to GPIO pins 4 and 6 for visual feedback.
Connect push buttons to GPIO pins 5 and 3. Pin 5 button to start/stop recordings and pin 3 as a shutdown button (optional)
Buttons must be connected to 3.3v and their GPIO pins. The script enables their pull down resistors.
You'll need "screen" installing and WiringPi http://wiringpi.com/