tags:

views:

26

answers:

2

Hi there,

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

+1  A: 

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

Drakosha
+1  A: 

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.

Chris Johnsen