From: KM Date: 2009-07-08T23:20:07+09:00 Subject: Re: Accept sh heredocs to Ruby script On 2009-07-08, Oliver Saunders wrote: > $ ./args_test.rb <> i >> like >> jam >> donenow > [] > > Can anyone explain this? The script args_test.rb sees no command line arguments because the shell didn't give it any. Instead, This type of redirection instructs the shell to read input from the current source until a line containing only WORD (with no trailing blanks) is seen. All of the lines read up to that point are then used as the standard input for a command. - from the bash docs about here documents (not specific to bash though). The opinion on jam was still available to the script on its standard input, but nothing as an argument. -- KM