bug-bash
[Top][All Lists]
Advanced

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

Re: combine xargs with EOF


From: DJ Mills
Subject: Re: combine xargs with EOF
Date: Wed, 17 Oct 2012 14:22:34 -0400

On Wed, Oct 17, 2012 at 1:52 PM,  <address@hidden> wrote:
>
> Sorry i was not clear,
>
> yes my purpose is
>
> " simply to avoid having a second file containing a bash script "
> but
>
> find .  -maxdepth 1 -name  '*.txt' -print0  | xargs -n 1 -P 10 bash -c 'echo 
> "$1" '
>
> or
>
> ls '*.txt' |   xargs -n 1 -P 10 bash -c 'echo $1 '
>
> do not print $1 so the argument (-n 1)  is not passed inside.
>
> any idea?
>
> Thanks
> Giuseppe
> p.s. my files are all without space.

"Simplified examples" do not help, they just confuse things even more.

Can you explain what the ACTUAL goal is? And just because you
currently have filenames without spaces doesn't mean that will always
be the case, or that it's OK to write unsafe code.



reply via email to

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