[CentOS] stupid bash question
Craig White
craig.white at ttiltd.comThu Aug 16 16:48:16 UTC 2012
- Previous message: [CentOS] stupid bash question
- Next message: [CentOS] stupid bash question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Aug 15, 2012, at 5:11 PM, fred smith wrote: > how about something (seemingly simple) like this: > > find out how many there are: > > count=`ls * | grep -c .MOV$` > > then diagnose the result: > > if [ $count -ge 1 ] > then > do your stuff here > else > echo oops. nothing to do! > fi > > of course, there are pitfalls... we're asuming that there are only FILES > that would match the pattern ".MOV", no directories. ---- very effective for my purposes, thanks. Craig
- Previous message: [CentOS] stupid bash question
- Next message: [CentOS] stupid bash question
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list