Re: [SLUG] zero-padding in bash

From: Eben King (eben1@tampabay.rr.com)
Date: Thu Oct 21 2004 - 23:52:23 EDT


On Thu, 21 Oct 2004, Levi Bard wrote:

> printf '%03d' "${varname}"

Thanks. Not so easily found as "typeset -Z3", but more versatile. That
will reduce my reliance on sed and dc for format conversions.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
              
           This message was created using recycled electrons.

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:02:09 EDT