0403-057 Syntax error at line 399 : `"' is not matched

Hi Everyone,

I am getting strange behavior, same script runs fine without any error in one AIX machine, whereas on another it is throwing this error "0403-057 Syntax error at line 399 : `"' is not matched", I also ran the script in debug mode.

This is the output, still doesn't say anything.

+ date +%d-%b-%Y
+ TZ=aaa24
+ [ -e /tmp/output/Backup_Report_05-Jun-2017 ]
./Backup_Report.sh[299]: 0403-057 Syntax error at line 399 : `"' is not matched.

I have scratched all my hairs to find out what is wrong, however no results, please check it and let me know, as i checked it in an online syntax checker and it was fine, moreover it works perfectly fine on another AIX server.

Attached is the script

It was a simple copy paste mistake, AIX seems to purge copied text in vi editor, I just checked the attached script and found whole while loop syntax and what not was missing.

---------- Post updated at 04:07 PM ---------- Previous update was at 03:56 PM ----------

What is the best way to copy a large amount of text on an AIX vi editor?

Hello sid1987,

If data is that large then why don't you copy the actual file first place(either from same server to different path or remote server to your current server) and edit it accordingly rather than getting confuse by copying thousands of lines and having chances of missing something.

EDIT: You could use sed or awk commands to print any specific lines from 1 file to another depending upon your need.

Thanks,
R. Singh