Re: Newbie alias question



On 2008-05-13, wswilson <wswilson@xxxxxxxxx> wrote:


Running in bash mac os 10.4:

alias lc="wc -l $1 | awk '{print $1}'"

Why is the awk command not receiving the output from wc? Am I doing
this completely wrong?

The first $1 is evaluated when the alias is defined. You need to write a
function instead of an alias.

lc () {
wc -l "$1" | awk '{print $1}'
}

or

lc () {
wc -l < "$1"
}

.



Relevant Pages

  • Re: Attachment Sizes
    ... they can't if they are exceeding the mailbox limit for the recipient. ... This is not an Exchange restriction, this is a restriction on the receiving ... Please do not send email directly to this alias. ... >>254921 XFOR: Error Message: 552 Requested Mail Action ...
    (microsoft.public.exchange.misc)
  • Re: fax service breaks with the new microsoft critical updates
    ... > Please do not send email directly to this alias. ... >> we are using two fax machines only for receiving faxes. ... >> failed whenever we apply the critical updates, on both machines. ... >> Receive failed due to a transmission error. ...
    (microsoft.public.win2000.fax)
  • Re: check.log corrupted
    ... Please copy any errors you are receiving in your application log to include ... Microsoft Exchange Support ... Please do not send email directly to this alias. ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.exchange2000.admin)
  • Re: Cannot Send mail to One Domain
    ... error\message are you receiving in the NDR's. ... Microsoft Exchange Support ... Please do not send email directly to this alias. ... SMTP Connector, running Norton antivirus ...
    (microsoft.public.exchange.connectivity)
  • Re: unable to access a specific domain ..
    ... Take a netmon sniff to see what is going on on the receiving end: ... telnet to connect manually) ... ~ if you can what NDR code comes back? ... Please do not send email directly to this alias. ...
    (microsoft.public.exchange.connectivity)