Re: Not so useless use of cat

2014-09-12 Thread Dennis Williamson
On Sep 12, 2014 7:12 PM, "Bob Proulx" wrote: > > Ralf Goertz wrote: > > Since you have used an invalid address I assume you are reading the > mailing list via a web archive or other means and did not CC you. > > > Why do I need cat (the second on) here? > > You don't. > > > $ echo first >file1 >

Re: Not so useless use of cat

2014-09-12 Thread Bob Proulx
Ralf Goertz wrote: Since you have used an invalid address I assume you are reading the mailing list via a web archive or other means and did not CC you. > Why do I need cat (the second on) here? You don't. > $ echo first >file1 > $ echo second >file2 > $ (for i in file[12] ; do cat "$i" > /dev

Re: Not so useless use of cat

2014-09-12 Thread Dennis Williamson
On Sep 12, 2014 6:42 PM, "Ralf Goertz" wrote: > > Hi, > > Why do I need cat (the second on) here? > > $ echo first >file1 > $ echo second >file2 > $ (for i in file[12] ; do cat "$i" > /dev/stdout ; done) | cat > both > > $ cat both > first > second > > > > If I omit the "| cat" after the loop

Not so useless use of cat

2014-09-12 Thread Ralf Goertz
Hi, Why do I need cat (the second on) here? $ echo first >file1 $ echo second >file2 $ (for i in file[12] ; do cat "$i" > /dev/stdout ; done) | cat > both $ cat both first second If I omit the "| cat" after the loop I get $ cat both second Even when using ">> both" instead of "> both"

Re:

2014-09-12 Thread Chet Ramey
On 9/11/14, 9:45 AM, Beorn Harris wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i386 > OS: solaris2.10 > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' > -DCONF_OSTYPE='solaris2.10' -DCONF_MACHTYPE='i386-pc-solaris2.10' > -DCON