How do you split a line in a word in shell script?

Phạm Quyết

New member
How do you split a line in a word in shell script?
Answer
The special shell variable $IFS is used in bash for splitting a string into words. $IFS variable is called Internal Field Separator (IFS) that is used to assign the specific delimiter for dividing the string. Word boundaries are identified in bash by $IFS. White space is the default delimiter value for this variable.
 

Tìm kiếm

Back
Top