Bug: shell history loses lines beginning with # in a here-document
From:
Jonathan Wakely
Subject:
Bug: shell history loses lines beginning with # in a here-document
Date:
Fri, 30 Sep 2011 20:40:20 +0100
[I've just created a bug report at Savannah, but looking at the Bash
page on gnu.org I realised it should have ben sent here rather than
<http://savannah.gnu.org/support/?107823>]
Run these command:
$ gcc -x c - <<EOT
#include <stdio.h>
int main() { printf("hi\n"); }
EOT
$ ./a.out
hi
now use the up cursor (or "fc -2" or any equivalent) to return to the
gcc command, it has been
mangled to:
gcc -x c - <<EOTint main() { printf("hi\n"); }
EOT
This is not the same command.
A # in a here-document is not a shell comment!
[Prev in Thread]
Current Thread
[Next in Thread]
Bug: shell history loses lines beginning with # in a here-document,
Jonathan Wakely<=