0

Want to be able to conveniently run the following command with ability to supply the search pattern GUNARS.

grep -rhi --include='*.el' \"GUNARS\" ~/Opstk/bin/gadin-1.0/"

How can I do this in bash. Should this be better done with an alias or by declaring a bash function?

Vera
  • 1,223

1 Answers1

0

One approach to make running the command grep -rhi --include='*.el' "GUNARS" ~/Opstk/bin/gadin-1.0/ more convenient for the end user would be to create a script or an alias in the user's shell profile file (e.g. .bashrc or .bash_profile) that sets the search pattern to "GUNARS" by default. This would allow the user to simply run the command or the script/alias, rather than having to manually specify the search pattern each time. Additionally, this could be implemented as part of the deployment process, ensuring that the script or alias is set up for all necessary users.

Mix tutor
  • 110