This question already has an answer here:
I want to know if i can pass an argument with an alias command.
alias d="dmesg|grep -iw usb|tail -5"
Now d will print the last 5 lines. if i want to use d to print a different number of lines, i have to make change in the alias command declaration of d again.
Is there any way i can modify the declaration of alias command so that i don't have to retype the declaration to change the number of lines. Like incorporating passing the number of lines as an argument while declaring alias for d or is there some other method to solve this?