[Top][All Lists]

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

Re: [Help-bash] copy files w

From: Eduardo Bustamante
Subject: Re: [Help-bash] copy files w
Date: Thu, 25 May 2017 15:32:42 -0500

On Thu, May 25, 2017 at 3:25 PM, Val Krem <address@hidden> wrote:
> find . -type f -name *.txt | for file in *.txt
>   do
>        cp "$file" "${file/.txt/_new.txt}"
>  done

The for loop doesn't care about the output of find. For that you'll
need to pipe find's output to something that does read from the pipe
(while read), or instead of find use bash's globstar, i.e. for file in

reply via email to

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