I'm using this alias to color my cat
results. However, I want to add line numbers to the output, but using ccat -n <filename>
is not working.
I can achieve it by ccat <filename> | cat -n
but I can't create an alias for that (I expect an alias such as ccatn
which I could use like ccatn <filename>
)
What can I do to get this functionality (meaning, type in a command and a file name and get the same result as typing ccat <filename> | cat -n
)?