Monday, August 11, 2014

Passing command line args to bash alias

alias digq='_(){ dig +short txt "$1".wp.dg.cx; }; _'

this reports a quick description of whatever is queried

$ digq cray
"Cray Inc. is an American supercomputer manufacturer based in Seattle, Washington. The company's predecessor, Cray Research, Inc. (CRI), was founded in 1972 by computer designer Seymour Cray. Seymour Cray went on to form the spin-off Cray Computer Corporat" "ion (CCC), in 1989, which went bankrupt in 1995, while Cray Research was bought by SGI the next year... http://en.wikipedia.org/wiki/Cray"

No comments:

Post a Comment