View bash interpretation of command but not executing the command
When I ran this command:
$ cat /etc/group | grep 'adm|cdrom|sudo|dip|plugdev|lpadmin|sambashare'
I get no result. Thus have no idea of what is wrong.
Then I have to search online for solution..... sometimes it can consumes a lot of time.
When I ran this it works:
$ cat /etc/group | grep 'adm\|cdrom\|sudo\|dip\|plugdev\|lpadmin\|sambashare'
So it occurs to me that there maybe a tool to let us see result of bash interpretation of the input (as in a Bash preprocessor or a Bash linter, for lack of a better description) BEFORE it sends the command to kernel for execution.
Is such tool available?
How do I do that?