trimmer des deux côtés
This commit is contained in:
parent
284db6fa5b
commit
ae4be5fc1f
5
ulib/awk
5
ulib/awk
|
@ -829,7 +829,10 @@ NR <= skip_lines { next }
|
||||||
$0 = ""
|
$0 = ""
|
||||||
for (i = 1; i <= headers_count; i++) {
|
for (i = 1; i <= headers_count; i++) {
|
||||||
value = substr(line, starts[i], sizes[i])
|
value = substr(line, starts[i], sizes[i])
|
||||||
if (trim_values) sub(/ *$/, "", value)
|
if (trim_values) {
|
||||||
|
sub(/^ */, "", value)
|
||||||
|
sub(/ *$/, "", value)
|
||||||
|
}
|
||||||
$i = value
|
$i = value
|
||||||
}
|
}
|
||||||
formatcsv()
|
formatcsv()
|
||||||
|
|
Loading…
Reference in New Issue