I would like to ask how to iterate the contents of the file by whitespace (\n) and not to read it line-by-line.

Here's a simple webservice code:

```
<?php

    $data = json_decode(file_get_contents('php://input'),true);
    print_r($data);

?>

```

When I try to run my script:

```
#!/bin/bash  
. /home/sample.txt

while read LINE; do
     curl -H "Content-Type:application/json -XPOST -k "https://sample/posthere.php" -d '{"info":"'"$info"'","grade":"'"$grade"'"}'
done < /home/sample.txt

```

Where the content of /home/sample.txt is:

```

info="student"
grade="Grade 1"

info="teacher"
grade="Grade 3"

```

Unfortunately, it results to this:

```

Array
(
    [info] => teacher
    [grade] => Grade 3
)
Array
(
    [info] => teacher
    [grade] => Grade 3
)
Array
(
    [info] => teacher
    [grade] => Grade 3
)
Array
(
    [info] => teacher
    [grade] => Grade 3
)
Array
(
    [info] => teacher
    [grade] => Grade 3
)

```

Suppose, I expect it to be like this:

```

Array
(
    [info] => student
    [grade] => Grade 1
)
Array
(
    [info] => teacher
    [grade] => Grade 3
)

```

I think I'm wrong with my **while read LINE** code in bash.
Any idea would highly be appreciated.