[Solved] Reading the last word in a file from a script

Hello everybody,

My first time here and my english is not very good I hope you understand me.

I'm trying to read a file that contains two zip archive names.
Here my file content is:
package1.zip package2.zip

At the end of the line there is a \n character.

I read this file from a script shell with a while loop, the reading code is:

while read -r Package_App Package_Cat
do
echo "$Package_App"
echo "$Package_Cat-----"
done < $FIC_PARAM
 

The result does not correct because in Package_Cat variable I have the '\n' character too! So, later in my script I can't use the $Package_Cat for finding the archive .zip.

Anyone knows how Can I have only 'package2.zip' in my Package_Cat variable without the \n character?

Thanks so much!!!

The $FIC_PARAM file you read is of what origin? DOS?
If DOS (WIN...) then convert the files with dos2ux or dos2unix command before...

Yesss!!! it was that!
Thank you so much vbe!