Hacker News new | ask | show | jobs
by ttGpN5Nde3pK 738 days ago
How does defining `IFS` here make the second statement more efficient than the first?

```

# Inefficient while read -r line; do echo "$line" done < file.txt

# Efficient while IFS= read -r line; do echo "$line" done < file.txt

```

https://omid.dev/2024/06/19/advanced-shell-scripting-techniq...

1 comments

Too late to edit, but serious question if anyone actually knows.