Assuming the input is hexadecimal, a function like this would format
each line as intended:
formatline() { printf "%010X \n";}
Then a line like this would give the intended result:
while read -r; do fl $REPLY; done
Hi all,
How can I starndarzied string column to have the same column leng
On 7/13/17 6:05 PM, John Reiser wrote:
> Bash Version: 4.3
> Patch Level: 43
> Release Status: release
>
> Description:
> When invoked as /bin/sh with SHELL unset, then bash should set SHELL
> to /bin/sh, not to the login shell for the current user.
Posix, the closest thing we ha
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale'
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
00
00
000