I am using sed within a while loop to remove the trailing blank spaces from a file containing a list of files. The blank spaces are being removed. But I'm getting the message sed:no input files.
Following is the while loop I am using:
while IFS= read -r line;
do
echo "tester: $line"
sed -i 's/\s*$//' $line ;
done < file_list.txt
file_list.txt?tail -1 file_list.txt? If you don't see anything except an empty line then you need to delete that empty line.