home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!daffy!saavik.cs.wisc.edu!quale
- From: quale@saavik.cs.wisc.edu (Douglas E. Quale)
- Subject: Re: lp or something like it?
- Message-ID: <1992Jul22.055139.14115@daffy.cs.wisc.edu>
- Sender: news@daffy.cs.wisc.edu (The News)
- Organization: Undergraduate Projects Lab, UW Madison
- References: <kBN8NB4w165w@ssg.com> <l6omtcINN5g4@priddy.cs.utexas.edu>
- Date: Wed, 22 Jul 1992 05:51:39 GMT
- Lines: 25
-
- In article <l6omtcINN5g4@priddy.cs.utexas.edu> woody@cs.utexas.edu (James Woodgate) writes:
- >
- >How can I make this script a Bash Alias???
- >
-
- I'm posting this rather than using email since I think maybe a fair
- number of folks might be interested in bash aliases.
-
- Csh aliases can take arguments. Bash aliases are like ksh aliases and
- do not permit arguments. In order to do this, you want to use a bash
- function:
-
- lp()
- {
- cat < $1 > /dev/lp1 &
- }
-
- This is also the POSIX compliant solution. (POSIX sh(1) has functions
- but not aliases.)
-
- I think someone will probably get ambitious and port an lp daemon to
- Linux soon.
- --
- Doug Quale
- quale@saavik.cs.wisc.edu
-