typeset in linux
I use type in ksh ,
typeset -Ln command under AIX to do the following: Left-justify. Remove leading spaces; if n is given, fill with spaces or truncate on right to length n." Somehow under Linux this not working ... Any ideas what I have to use here instead ? |
probably because you use bash (try echo $0). You can try ksh on linux too - if installed. In bash I think you need to use printf (see man page)
|
Quote:
my current question is I have set a variable , similar as below VAT=$(grep ...) echo $VAT " " The problem now is the display of $VAT is not tidy , I would like to set the $VAT displaying in left n line "Ln" , how to do it ? thanks |
see man bash and look for printf formatting
printf -v VAT "%6s" "$VAT" |
All times are GMT -5. The time now is 07:28 PM. |