Re: simple echo into multiple files...

2017-01-27 Thread Matthew Miller
On Fri, Jan 27, 2017 at 09:49:28AM +1100, Cameron Simpson wrote: > You can do it with a single tee command you know: > echo b | tee *.aa >/dev/null > or more likely (depends on the OP's use case): > echo b | tee -a *.aa >/dev/null Be aware that if there are no files matching *.aa, you will get a

Re: simple echo into multiple files...

2017-01-27 Thread Cameron Simpson
On 25Jan2017 08:42, Ian Pilcher wrote: On 01/25/2017 08:02 AM, bruce wrote: say you have aa.aa aaa.aa is there a "simple" way to do echo 'b' > *.aa If you don't need to doing it with an arbitrary number of files, you can do this with one or more tee(1) commands. For example: echo 'b' | te

Re: simple echo into multiple files...

2017-01-25 Thread Roberto Ragusa
On 01/25/2017 05:23 PM, George N. White III wrote: > Avoid unnecessary copies: > > echo 'b' > a > > for f in b c d f ; do ln a $f ; done But then echo 'x' > d and have a look at c. It may not be want you want. -- Roberto Ragusamail at robertoragusa.it _

Re: simple echo into multiple files...

2017-01-25 Thread Joe Wulf
Thanks Roberto, yes, that is elegant even.:) From: Roberto Ragusa To: users@lists.fedoraproject.org Sent: Wednesday, January 25, 2017 10:10 AM Subject: Re: simple echo into multiple files... On 01/25/2017 03:42 PM, Joe Wulf wrote: > Bruce, > > #  Create two new files &

Re: simple echo into multiple files...

2017-01-25 Thread George N. White III
On Wed, Jan 25, 2017 at 10:03 AM bruce wrote: > morn/quick question... > > say you have > aa.aa > aaa.aa > > is there a "simple" way to do > echo 'b' > *.aa > > this doesn't work, gets a redirection error > > I know one can write a quick bash/shell loop.. any other ways? Avoid unnecessary copies

Re: simple echo into multiple files...

2017-01-25 Thread Roberto Ragusa
On 01/25/2017 04:10 PM, Roberto Ragusa wrote: > On 01/25/2017 03:42 PM, Joe Wulf wrote: >> Bruce, >> >> # Create two new files >> echo 'b' | tee aa.aa aaa.aa >> > > With wildcard expansion: > > echo 'b' | tee *.aa > well, of course not when creating new files, but that would work for appe

Re: simple echo into multiple files...

2017-01-25 Thread Roberto Ragusa
On 01/25/2017 03:42 PM, Joe Wulf wrote: > Bruce, > > # Create two new files > echo 'b' | tee aa.aa aaa.aa > With wildcard expansion: echo 'b' | tee *.aa -- Roberto Ragusamail at robertoragusa.it ___ users mailing list -- users@lists.fed

Re: simple echo into multiple files...

2017-01-25 Thread Joe Wulf
ce for all such things and will make you far more invaluable in researching and solving these kinds of problems. From: bruce To: Community support for Fedora users Sent: Wednesday, January 25, 2017 9:02 AM Subject: simple echo into multiple files... morn/quick question... say you

Re: simple echo into multiple files...

2017-01-25 Thread Ian Pilcher
On 01/25/2017 08:02 AM, bruce wrote: morn/quick question... say you have aa.aa aaa.aa is there a "simple" way to do echo 'b' > *.aa If you don't need to doing it with an arbitrary number of files, you can do this with one or more tee(1) commands. For example: echo 'b' | tee a.txt | tee b.

Re: simple echo into multiple files...

2017-01-25 Thread Richard Shaw
On Wed, Jan 25, 2017 at 8:02 AM, bruce wrote: > I know one can write a quick bash/shell loop.. any other ways? > for $file in *.aa; do echo 'b' > $file; done Richard ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an em

simple echo into multiple files...

2017-01-25 Thread bruce
morn/quick question... say you have aa.aa aaa.aa is there a "simple" way to do echo 'b' > *.aa this doesn't work, gets a redirection error I know one can write a quick bash/shell loop.. any other ways? thanks ___ users mailing list -- users@lists.fed