bug-bash
[Top][All Lists]
Advanced

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

Re: Passing paths with spaces from one command to another


From: Mike Frysinger
Subject: Re: Passing paths with spaces from one command to another
Date: Tue, 10 Mar 2009 07:55:59 -0400
User-agent: KMail/1.11.1 (Linux/2.6.28; KDE/4.2.1; x86_64; ; )

On Tuesday 10 March 2009 07:42:29 Angel Tsankov wrote:
> I want to pass the output from one command (e.g. find) to some other
> command so that each path (output by the first command) gets into a
> distinct positional parameter of the second command.  How can I do this if
> some paths contain spaces?

use the -print0 option with find and pipe it into xargs with the -0 option

find . -print0 | xargs -0 ls
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]