Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Why I am getting error in done statement, I am not able to fix this

+4 votes
asked Feb 12 by Nirali Patel (720 points)
echo "$File"
while read -r line
    echo "$line"
    Amount_paid= Amount_paid + Amount_paid | bc
    printf %date+ %mm-%dd-%Y , %dd.cc

1 Answer

0 votes
answered Feb 13 by Peter Minarik (69,270 points)

I think when you copy-paste code into the OnlineGDB it gets confused over line end characters.

You should make sure your lines in your file on your computer do not contain \r\n (Windows line endings) but \n only (Linux line endings) before copying the code to OnlineGDB.

If I do this for your code, it runs (but contains further issues).

I'd recommend using Notepad++ and you can click Edit/EOL Conversion/Unix (LF).

Good luck!

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.