Spaces (and other characters) in filenames
Gustav H Meyer
gustav at gcis.gov.za
Thu Aug 24 06:01:46 UTC 2006
Hi Dotan,
On 23/08/2006 19:31, Dotan Cohen wrote:
> Specifically, interacting with files through bash. I see that
> I've asked quite a few questions on the subject in the past.
What do you mean when you say interacting with files through bash?
What are you trying to do?
Most of the times there's no need to write a new script. For
example: Have you ever seen the power of the find command combined
with xargs?
$ find . -type f -print0 |xargs -0 grep -li "mystring"
The above mentioned command will find all files (including those
with spaces) starting in the current directory and return only those
that contain the word "mystring" (no matter the case).
If you are serious about manipulating files you may want to consider
something like perl.
See also: $ man find2perl
Regards,
Gustav
More information about the kubuntu-users
mailing list