help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] have the same column L


From: Chris F.A. Johnson
Subject: Re: [Help-bash] have the same column L
Date: Fri, 14 Jul 2017 15:20:58 -0400 (EDT)
User-agent: Alpine 2.10 (DEB 1266 2009-07-14)

On Fri, 14 Jul 2017, Val Krem wrote:

Hi all,

How can I starndarzied string column to have the same column length for each 
row.

Example
filename

A135953
D10036050
C135858000

I want add leading zeros and the column length should be 10

I tried
awk '{ printf "%010s \n", $1}' filename

  awk '{ printf "%010d \n", $1}' filename

--
Chris F.A. Johnson, <http://cfajohnson.com>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]