|
From: | Chet Ramey |
Subject: | Re: feature request : at ' unexpected end of fille ' error msg append also the still-open direcrive |
Date: | Wed, 21 Aug 2024 11:36:26 -0400 |
User-agent: | Mozilla Thunderbird |
On 8/21/24 11:28 AM, Greg Wooledge wrote:
Here's an even simpler reproducer: hobbit:~$ ./foo ./foo: line 5: syntax error: unexpected end of file hobbit:~$ cat foo #!/bin/bash shopt -s expand_aliases alias run=' ' true && run The "true &&" is required. If the final line is "run", there is no error message.
That is a syntax error. There is no command following the `&&' and the shell reads EOF before finding one. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |