Skip to content
Advertisement

Shell script ‘read’ doesnt work with ‘EOF’

This script below is working, I want to read a value from files svc1.data and used it in syntax.

JavaScript

But this script below doesn’t work, it keeps saying : -bash: syntax error near unexpected token `;’

JavaScript

Please help, whats wrong with the 2nd script..

Advertisement

Answer

Just close the HEREDOC, like this:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement