I'd like to create a script that keeps track of the commands used.
For example:
count ls ps
and from now on whenever I use ls or ps a counter is increased.
I want that after the command count has been activated a session starts(here I can use any commands) and I want to stop the session with a special command(quit for example).
In the end I want to print the result.
I'm a beginner in shell scripting and I don't know how to allow the shell continuing his work after my command has started.
What does awk actually do?
I read that combines grep and sed commands but I don't understand this '$1=" "'.
It works only if I don't create a script.
What should I do to make a working script of that code?