shell - create a custom Linux command for repetitive commands -
i find myself running command time
grep -r "somestring" /workplace/scripts /workplace/server
i replace simple custom command
s "somestring"
which same thing.
how do this? i'm new linux.
your example suggests variable search string. define function:
s() { grep -r -- "$1" /workplace/scripts /workplace/server }
and invoke saying:
s "somestring"
Comments
Post a Comment