Wednesday, January 5, 2011

ls and egrep

This is something I oughta remember with a flip of a switch, drop of a coin, from the back of my hand, yada yada, and as I was writing a shell script to verify the presence of files of a certain file extension I actually had too google for this, unbelievable. The file extensions are: .zip and .txt

ls /opt/payments/prov1 | egrep "\.(zip|txt)" 

1 comment:

Coffee Girl said...

Hey there... please relink me.
http://coffee-country-talk.blogspot.com/

Coffee Girl