If I want to temporarily change the IFS like in the example here:
Code:
while IFS='' read -r var ; do cmd ; done ;
Then does it matter which of these are used?
Do they do anything different from each other?
Code:
env -u IFS ; cmd ;
env -u IFS cmd ;
IFS='' ; cmd ;
IFS= ; cmd ;
IFS='' cmd ;
IFS= cmd ;
OLDIFS=IFS ; unset IFS ; cmd ; set IFS=OLDIFS ; unset OLDIFS ;
OLDIFS=IFS ; unset IFS cmd ; set IFS=OLDIFS ; unset OLDIFS ;