This is from a k shell script.
echo " $LINE\c"|awk '{printf("%-20s",$0)}' # print menu item
As you can see, in the second line of code,
I am trying to make the statement dynamic
by replacing the hard coded 20 with a shell variable.
echo " $LINE\c"|awk '{printf("%-${MENU_ITEM_WIDTH}s",$0)}'
Anyone know the correct syntax for the line above?
Thanks in advance,
Robert
Robert G. Jordan
Robert G. Jordan
Robert@JORDAN2000.com
Unix Sys Admin
Chicago, Illinois U.S.A.
echo " $LINE\c"|awk '{printf("%-20s",$0)}' # print menu item
As you can see, in the second line of code,
I am trying to make the statement dynamic
by replacing the hard coded 20 with a shell variable.
echo " $LINE\c"|awk '{printf("%-${MENU_ITEM_WIDTH}s",$0)}'
Anyone know the correct syntax for the line above?
Thanks in advance,
Robert
Robert G. Jordan
Robert G. Jordan
Robert@JORDAN2000.com
Unix Sys Admin
Chicago, Illinois U.S.A.