Reputation: 93
cdl ()
{
cd $1
ls
}
So I use the above in my bash_aliases file by running cdl /lib/systemd/systemd
.
My question is how can I add grep to this. I'd like to be able to do something like cdl [/path] [grep query]
maybe something like
cdlg ()
{
cd "$1"
ls | grep -ni
}
Upvotes: 1
Views: 147