AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  Alias problem

    Posted Fri December 17, 2010 10:40 AM

    Originally posted by: enidvx


    Hi to all,
    I'm facing some problems when adding an alias like:
    #alias list="ls -al | awk '{ print $1, $2, $3, $4, (($5/1048576))"\t", $6, $7, $8, $9 }'"

    and when I enter:
    #list
    I get:
    Syntax Error The source line is 1.
    The error context is
    { print >>> , <<<
    awk: 0602-502 The statement cannot be correctly parsed. The source line is 1.

    Can you tell where the problem can be?
    Thanks
    Enid
    #AIX-Forum


  • 2.  Re: Alias problem

    Posted Fri December 17, 2010 10:50 AM

    Originally posted by: enidvx


    Just to add some info, I'm running ksh Version M-11/16/88f on AIX version 5.3

    Thanks.
    #AIX-Forum


  • 3.  Re: Alias problem

    Posted Fri December 17, 2010 11:23 AM

    Originally posted by: enidvx


    Ok, the solution was:

    alias list="ls -al | awk '{ print \$1, \$2, \$3, \$4, ((\$5/1048576))\"\t\", \$6, \$7, \$8, \$9 }'"

    Thanks,
    Enid
    #AIX-Forum