Re: How to create parameterized aliases in bashrc
Aman Jain wrote: > Hi > > I would like to create an alias to show Nth line of a file. > > I tried something like > alias shline='head -$1 $2 | tail -1' #$1 is the line number and $2 > is the filename ># Usage should be : > $shline 5 fi
How to create parameterized aliases in bashrc
Hi I would like to create an alias to show Nth line of a file. I tried something like alias shline='head -$1 $2 | tail -1' #$1 is the line number and $2 is the filename # Usage should be : $shline 5 file.txt But it isn't working..