I frequently use this command:
grep -rnw donkey | grep market | cut -c -80
How can I change it into an alias on Linux?
I tried:
alias search='grep -rnw $1 | grep $2 | cut -c -200'
But when I run it with
search hello world
it gives me:
cut: Usage: grep [OPTION]... PATTERN [FILE]...
hello: No such file or directory
cut: Try 'grep --help' for more information.
world: No such file or directory
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.