Wednesday 31 July 2019

HOW TO LEFT PAD NUMBERS IN LINUX

There are many ways to left pad numbers in Linux. Usually this seems to be done by adding leading zeros in front of the main number. A few examples of doing this can be seen below:

Using printf

Using AWK

Looping in Bash

0 comments:

Post a Comment