When in the vi editor, I can find where the value of variables in COBOL programs (everything is uppercase) get changed with
/[NOTEP][EGMOT] *ACCT-BALANCE
and it will find the last two characters of reserved words such as ACCEPT, FROM, TO, and COMPUTE followed by at least one space before the variable I'm looking for.
Running something similar through grep such as
grep "[NOTEP][EGMOT] *ACCT-BALANCE" *.CBL
would display all occurrences of ACCT-BALANCE with or without a keyword or leading space (BACCT-BALANCE for example). In both cases, there are two spaces before the asterisk.
What am I missing?
TIA