The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-10-2009
metaltree metaltree is offline
Registered User
  
 

Join Date: Feb 2009
Location: Québec city
Posts: 4
Cannot redirect to STDIN in a shell script

I am unable to use STDIn redirection with < (commands)
When I do the following, both approaches work and give the same results:

1.
Code:
$ printf "aaa\nbbb\n" > file1
$ printf "111\n222\n" > file2
$ cat file1 file2
aaa
bbb
111
222
2.
Code:
$ cat <(printf "aaa\nbbb\n") <(printf "111\n222\n")
aaa
bbb
111
222
However, the second approach won't work when I put in in a script.

I am using Cygwin1.5.25-15

Any clue?