On 11/03/18 05:43 PM, Ray Andrews wrote:
Is there any way to immunize my functions against $IFS trouble? I have functions that seem to require " $IFS=$'\n' " and others that insist on " $IFS=' ' ". It would be nice if I didn't have to reset it in each function. I'll bet there will be syntax that always does the right thing regardless of $IFS.On 11/03/18 03:53 PM, Marc Chantreux wrote:Thanks so it does. I tried that and 50 other ideas. I just now realized it was because I had $IFS=$'\n'"$@" expands as an array and "$*" expands as a string so func () cp oldfile "$*"set in another function :-( Cost me half the day.