| Subject: | How to create parameterized aliases in bashrc |
|---|---|
| From: | Aman Jain <amanjain.nitrkl@xxxxxxxxx> |
| Date: | Sat, 26 Jul 2008 01:52:37 -0700 (PDT) |
| Newsgroups: | gnu.bash.bug |
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......
Can anyone suggest a better alternative
Thanks
Aman Jain
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | kill job vs. pid, Daniel Norton |
|---|---|
| Next by Date: | Re: How to create parameterized aliases in bashrc, Dave B |
| Previous by Thread: | kill job vs. pid, Daniel Norton |
| Next by Thread: | Re: How to create parameterized aliases in bashrc, Dave B |
| Indexes: | [Date] [Thread] [Top] [All Lists] |