[ale] Bash scripting and printf

Michael D. Ivey ivey at realminfo.com
Tue Sep 15 13:41:53 EDT 1998


On Tue, Sep 15, 1998 at 11:11:06AM -0500, Bob Kruger wrote:
> $ printf "Number of lines received:  %20s $lr \n\n "

$ printf "Number of lines received:  %20s\n\n" "$lr"

Just like C.  Only not.

> What I had to go to was this:
> 
> $ printf "Number of lines received:  "
> $ printf "%20s" "%lr"
> $ printf "\n\n"
> 
> It makes it a little complicated, but it does work...

...but not nearly as elegantly.

-- 
Michael D. Ivey, RHCE  <ivey at realminfo.com>
Senior Technical Manager, REALM Information Technologies 
http://www.realminfo.com/
(770) 446-1332 x 114






More information about the Ale mailing list