[CentOS] TIP for broken ARIN whois
Bart Schaefer
barton.schaefer at gmail.comMon Sep 12 04:55:35 UTC 2011
- Previous message: [CentOS] TIP for broken ARIN whois
- Next message: [CentOS] TIP for broken ARIN whois
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Sep 11, 2011 at 7:31 PM, Always Learning <centos at u61.u22.net> wrote: > >> > #!/bin/bash >> > whois -h whois.arin.net n + $1 > >> Any particular reason you used a bash script as opposed to an alias in >> your bash config? > > My understanding of aliases is I can not include additional parameters With bash / ksh / zsh aliases you can't rearrange the parameters, but you can always add them to the end. E.g. this: alias .arin='whois -h whois.arin.net n +' can be called as .arin 64.64.64.64 and will expand the way you want. However, if you needed to have something come after 64.64.64.64, or to be mixed in with the whois options, you'd have to use a script or a shell function. I.e., if you wanted to pass the name of the whois server rather than hardcode it: .arin() { whois -h $1 n + $2; } That can't be done with an alias (except in csh).
- Previous message: [CentOS] TIP for broken ARIN whois
- Next message: [CentOS] TIP for broken ARIN whois
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list