../blog

    craig
 Today at 1:40 PM
hey, I can't play my beastie boys mp3s! :disappointed:
craig@w500:~/Music/Beastie Boys/Pauls Boutique$ ls
-10.mp3  -11.mp3  -12.mp3  -13.mp3  -14.mp3  -15.mp3  -1.mp3  -2.mp3  -3.mp3  -4.mp3  -5.mp3  -6.mp3  -7.mp3  -8.mp3  -9.mp3
craig@w500:~/Music/Beastie Boys/Pauls Boutique$ music
Error parsing option 10.mp3 (option not found)
Setting commandline option --10.mp3= failed.

Exiting... (Fatal error)
2 replies


craig
  3 minutes ago
problem solved
for f in -*.mp3; do echo ${f#-}; mv -- $f ${f#-}; done


craig
  2 minutes ago
man bash ->
       ${parameter#word}
       ${parameter##word}
              Remove  matching  prefix  pattern.   The word is expanded to produce a pattern just as in pathname expansion, and matched
              against the expanded value of parameter using the rules described under Pattern Matching below.  If the  pattern  matches
              the  beginning  of  the  value of parameter, then the result of the expansion is the expanded value of parameter with the
              shortest matching pattern (the ``#'' case) or the longest matching pattern (the ``##'' case) deleted.  If parameter is  @
              or  *,  the pattern removal operation is applied to each positional parameter in turn, and the expansion is the resultant
              list.  If parameter is an array variable subscripted with @ or *, the pattern removal operation is applied to each member
              of the array in turn, and the expansion is the resultant list.