How could I run this command as an alias?
alias findsum='find /home/sams/ -name sum.txt -exec grep -H "$1" {} \;'
This should be very simple, but I am not able to make it work.
findsum test
find: paths must precede expression: `test'
How could I run this command as an alias?
alias findsum='find /home/sams/ -name sum.txt -exec grep -H "$1" {} \;'
This should be very simple, but I am not able to make it work.
findsum test
find: paths must precede expression: `test'
ls
alias on most distro, which most use additional argument with...) @steeldriver – Nordine Lotfi May 17 '21 at 19:47alias findsum='find /home/sams/ -name sum.txt -exec grep -H "$1" {} \;'
I can't find an answer in the linked post and someone decided to close the question – user1156544 May 17 '21 at 19:52findsum
as a function. e.g.findsum () { find /home/sams/ -name sum.txt -exec grep -H "$1" {} + ; }
. – cas May 18 '21 at 01:57