Skip to main content
InterviewHubPRO
Section Overview
Q33

Question 33 of 50

Part 3: Advanced Text Processing & Production Internals (Senior / Lead)

66%
Bash & Shell Scripting (50 Qs)•Part 3: Advanced Text Processing & Production Internals (Senior / Lead)

What is the Internal Field Separator (`$IFS`)?

senior LevelCode Examplebash-shellAdvanced Text Processing

In Simple Words: $IFS determines how Bash recognizes word boundaries during word splitting:

  • Default value: <space><tab><newline>.
  • You can temporarily customize it to parse CSV or colon-separated strings:
bash
csv_line="Alice,30,Developer"
IFS=',' read -r name age role <<< "$csv_line"