trivial: bash, local variable assignment
I made a short script to help me learn bash. The function in question is:
Code:
watchVideo() { Code:
find $HOME/* -name [*.mpg,*.flv,*.avi] | sort ***** Update: I tried "find -name $HOME/*/[*.mpg, *.flv, *.avi] | sort" which gave: Code:
find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `/home/agrestic/*/[*.mpg,'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Code:
find: paths must precede expression: *.flv, TIA. |
See if using the Boolean OR operator does what you want...
Code:
video=$(find $HOME/* -name *.flv -o -name *.mpg -o -name *.avi | sort) |
Beat me to it...:)
|
Works perfectly. :D
Consequently, I just found a site explaining boolean -o. Thanks weibullguy and TB0ne. |
All times are GMT -5. The time now is 10:13 AM. |