Re: Read stdin delimited fails on empty field

2016-07-07 Thread Chet Ramey
On 7/7/16 3:01 PM, Todd Merriman wrote: > Bash Version: 4.2 > Patch Level: 46 > Release Status: release > > Description: > IFS=' ' # TAB > program_outputting_tab_delimited_fields | > while read -r FLD1 FLD2 FLD3 FLD4 > do > echo field1=$FLD1 >

Re: Read stdin delimited fails on empty field

2016-07-07 Thread Greg Wooledge
On Thu, Jul 07, 2016 at 03:01:31PM -0400, Todd Merriman wrote: > IFS=' ' # TAB > If any fields are empty, the data is read into the preceding field. > In other words, if in the example FLD3 is empty, FLD4 is read into > FLD3. If FLD2 and FLD3 are empty, FLD4 is r