Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bash: A: unrecognized history modifier

Tags:

bash

After running a c program, giving it some input on the command line (the program simulates a pushdown automata), I get the following response:

bash: A: unrecognized history modifier

I have googled, but I can't find an explanation as to what this means exactly. My program works with other test input, so I assume it's something to do with the input rather than my program (lol).

Cheers in advance

Joe

like image 484
Joe Avatar asked May 25 '10 10:05

Joe


2 Answers

bash provides “history expansion” when you use an exclamation point (!) on the command line (except inside single quotes, after a backslash, or if history expansion is disabled).

If you have an exclamation point in your command line or here document, you should escape or quote it.

See the bash documentation for History Expansion and its subsections: Event Designators, Word Designators, and Modifiers for all the details.

like image 164
Chris Johnsen Avatar answered Sep 23 '22 01:09

Chris Johnsen


Please add the exact command line you are using. I guess you have '!' in it, which you did not escape.

like image 28
Drakosha Avatar answered Sep 23 '22 01:09

Drakosha