Re: Shell question

2017-01-05 Thread Cameron Simpson
On 28Dec2016 16:34, JD wrote: Jon LaBadie introduced me to: exec 5< .kshrc exec 6< .profile while read -u 5 one && read -u 6 two; do echo $one echo $two done Who wants a -u? You can just redirect into a read you know... while read one <&5 && read two <&6; do I suspect -u isn't very portabl

Re: Shell question

2017-01-05 Thread Cameron Simpson
On 27Dec2016 15:49, JD wrote: Reading lines from 2 files in such a way that each iteration lets me read the next line from each file so that the items read from each file are in sync as far as line number is concerned. Is this "doable"? For a single file, indexing to next line is automatic, vis

Re: Shell question

2016-12-28 Thread JD
On 12/28/2016 06:14 AM, Andy Blanchard wrote: On 27 December 2016 at 22:49, JD wrote: Reading lines from 2 files in such a way that each iteration lets me read the next line from each file so that the items read from each file are in sync as far as line number is concerned. Is this "doable"?

Re: Shell question

2016-12-28 Thread JD
On 12/28/2016 05:55 AM, Robert Nichols wrote: On 12/28/2016 01:02 AM, Joachim Backes wrote: On 12/27/2016 11:49 PM, JD wrote: Reading lines from 2 files in such a way that each iteration lets me read the next line from each file so that the items read from each file are in sync as far as line

Re: Shell question

2016-12-28 Thread JD
On 12/28/2016 12:02 AM, Joachim Backes wrote: On 12/27/2016 11:49 PM, JD wrote: Reading lines from 2 files in such a way that each iteration lets me read the next line from each file so that the items read from each file are in sync as far as line number is concerned. Is this "doable"? For a

Re: Shell question

2016-12-28 Thread Samuel Sieb
On 12/27/2016 02:49 PM, JD wrote: Reading lines from 2 files in such a way that each iteration lets me read the next line from each file so that the items read from each file are in sync as far as line number is concerned. Is this "doable"? For a single file, indexing to next line is automatic,

Re: Shell question

2016-12-28 Thread Andy Blanchard
On 27 December 2016 at 22:49, JD wrote: > Reading lines from 2 files in such a way that each iteration > lets me read the next line from each file so that the items > read from each file are in sync as far as line number is concerned. > Is this "doable"? Maybe a little out of the box, but far sim

Re: Shell question

2016-12-28 Thread Robert Nichols
On 12/28/2016 01:02 AM, Joachim Backes wrote: On 12/27/2016 11:49 PM, JD wrote: Reading lines from 2 files in such a way that each iteration lets me read the next line from each file so that the items read from each file are in sync as far as line number is concerned. Is this "doable"? For a si

Re: Shell question

2016-12-27 Thread Joachim Backes
On 12/27/2016 11:49 PM, JD wrote: Reading lines from 2 files in such a way that each iteration lets me read the next line from each file so that the items read from each file are in sync as far as line number is concerned. Is this "doable"? For a single file, indexing to next line is automatic,