[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] have the same column L
From: |
Val Krem |
Subject: |
[Help-bash] have the same column L |
Date: |
Fri, 14 Jul 2017 01:29:45 +0000 (UTC) |
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
Got all zeros
0000000000
0000000000
0000000000
0000000000
But I want
000A135953
0D10036050
C135858000
I would appreciate if you help me out.
thank you in advance
- [Help-bash] have the same column L,
Val Krem <=