You seem to possibly be using
bash since you're using a "here-string" (
<<<). Additionally, in some other shells,
read -p will read from a coprocess, which means your code would produce different results from what you say in comments. So it's most likely
-p option to the
read utility in
bash takes an option-argument. This option-argument is a string that will be used as the interactive prompt when asking a user for a value. In your code, that prompt will be the string
I, while the variables
K will be assigned data by
read from standard input (your string
$A). This is why
$I is an empty string when you
$ read -p 'Enter value: ' thing
Enter value: hello
$ printf '%s\n' "$thing"
I assume you meant to use something like
-r instead of
IFS='-' read -r I J K <<<"$A"
printf 'Lin number is %s\n' "$I"
printf 'Michele Number is %s\n' "$J"
printf 'Gina number is %s\n' "$K"