People,
Date: Sat, 20 Feb 2016 18:49:55 -0800
From: John Wendel <jwendel10(a)comcast.net>
To: users(a)lists.fedoraproject.org
Subject: Re: Bash / Escaping quotes is driving me crazy . .
Message-ID: <56C925D3.5040005(a)comcast.net>
Content-Type: text/plain; charset=utf-8; format=flowed
On 02/20/2016 04:05 PM, Philip Rhoades wrote:
> People,
>
> This line correctly finds one MP3 but misses two FLACs:
>
> ssh localhost "find
> /home/phil/music/ambient/RobertGass+OnWingsOfSong/OmNamahaShivaya
> -maxdepth 1 -type f \\( -name "*.mp3" -o -name "*.m4a" -o -name
> "*.flac" \\)"
>
> Adding extra escapes fixes the problem:
>
> ssh localhost "find
> /home/phil/music/ambient/RobertGass+OnWingsOfSong/OmNamahaShivaya
> -maxdepth 1 -type f \\( -name \"*.mp3\" -o -name \"*.m4a\" -o
-name
> \"*.flac\" \\)"
>
> . . but why is there only a problem with the "flac" OR? - all three
> files have at least one space in the filename:
>
> 01_Early Morning.mp3
> 02 Om.flac
> 01 Om Namaha Shivaya.flac
>
> Thanks,
>
> Phil.
> --
> Philip Rhoades
>
> PO Box 896
> Cowra NSW 2794
> Australia
> E-mail: phil(a)pricom.com.au
I usually resort to running "detox" on the file. Try >man detox.
Thanks for that, detox is nice but if I was going to be thinking about
renaming files in this case I would use my own method eg:
File:
01 Om Namaha Shivaya.flac
detox produces:
01_Om_Namaha_Shivaya.flac
but I would do:
01_OmNamahaShivaya.flac
Date: Sat, 20 Feb 2016 20:05:19 -0700
From: jd1008 <jd1008(a)gmail.com>
What I do is:
find <some dir> -name \*.mp3 -o -name \*.flac -o -name \*.mp4
and I get ALL the files with those extensions listed.
Notice: No quotes!!!
That is an improvement - thanks!
Phil.
--
Philip Rhoades
PO Box 896
Cowra NSW 2794
Australia
E-mail: phil(a)pricom.com.au