Re: Bash script for files with spaces in the filenames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I use the xargs method as well.  Note the -print0, and the -0 params.
It works great for any time dealing with special characters

Tim Fenn wrote:
> On Thu, Feb 16, 2006 at 11:29:04AM +0200, Dotan Cohen wrote:
> 
>>Another friend has provided me with a simple bash script that performs
>>an operation on all the files of a directory. However, many of the
>>file names contain spaces. How can I modify the following code to work
>>on files with spaces? The directory is on a mounted FAT32 partition.
>>
> 
> 
> xargs, yo!
> 
> find $(pwd) -name "*.mp3" -print0 | xargs -0 eyeD3 --force-update --set-encoding=utf8
> 
> HTH,
> Tim
> 

- --
Michael Yep
Development / Technical Operations
RemoteLink, Inc.
(630) 983-0072 x164

GPG Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x126439D9

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD9MSg0hHqPRJkOdkRApzBAJ9lBCXjjobBPPyASjHZxbYPEHaNBQCeLqGg
HJWspX0oyeJ6cHqdOasb/pI=
=x1BA
-----END PGP SIGNATURE-----


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux