Đỗ Thu Hiền
New member
How do you split a shell script?
Answer
In bash, a string can also be divided without using $IFS variable.
The ‘readarray’ command with -d option
is used to split the string data. The -d option is applied to define the separator character in the command like $IFS. Moreover, the bash loop is used to print the string in split form.
Answer
In bash, a string can also be divided without using $IFS variable.
The ‘readarray’ command with -d option
is used to split the string data. The -d option is applied to define the separator character in the command like $IFS. Moreover, the bash loop is used to print the string in split form.