Hi all
How to use bash and IFS to split a string?
eg.
$string = "Name:Surname:10"
IFS=:
echo "$string" | read name surname age
This does not work for some reason. The read does not create name, surname and age variables. Any idea why?
Appreciate your reply.
Kind regards
Unga