Re: printf statement
From: Ed Morton (morton_at_lsupcaemnt.com)
Date: 06/07/05
- Next message: Sven Mascheck: "Re: PS1 value in shells"
- Previous message: William: "Re: Any way to perform safe eval-like variable expansion?"
- In reply to: su: "Re: printf statement"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 07 Jun 2005 14:00:21 -0500
su wrote:
> Suppose we have to print the integer we are giving command
>
> printf "%d",variable
>
> if we have to print string values we are giving command
>
> printf "%s",stringvar
>
> In the same way if i have to print a values in a format like (99.06%) .
> How to acheive this format by using printf command ?
>
$ printf "(%.2f%%)\n" 99.06
(99.06%)
Ed.
- Next message: Sven Mascheck: "Re: PS1 value in shells"
- Previous message: William: "Re: Any way to perform safe eval-like variable expansion?"
- In reply to: su: "Re: printf statement"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]