implementation of printf '%N$' numbered argument conversion specifier, compatible with coreutils

This commit is contained in:
Chet Ramey
2025-12-05 15:50:38 -05:00
parent 5a104e96d8
commit f27bf94a79
29 changed files with 2012 additions and 1428 deletions
+70
View File
@@ -397,3 +397,73 @@ VAR=[]
VAR=[X]
XY
XY
printf8.sub
three one
hello world
C B A
D
42 42
three one
four
11
22
A C B
D
A B A
01
01
001
2
01
01
1
1
three one one
four four
0
C A B B A
F D E E D
G H H G
== 6==
== 67==
== 67==
== 67==
====
== 67==
== ==
== 67==
== 7==
== 67==
== 78==
== 67==
== 789==
== 67==
== 789==
== 6==
== 67==
== 67==
==45==
==45==
==45==
== ==
==45==
== 4==
==45==
== 45==
==45==
==456==
==45==
==456==
1 2
A B
1
0001
0001
./printf8.sub: line 87: printf: `$': invalid format character
./printf8.sub: line 89: printf: `$': invalid format character
./printf8.sub: line 92: printf: A: invalid number
01$s B
./printf8.sub: line 95: printf: `$': invalid format character