Thread Text-Datei in mehrere Dateien splitten (21 answers)
Opened by hybi at 2013-07-23 11:07

Linuxer
 2013-07-30 12:56
#169211 #169211
User since
2006-01-27
3875 Artikel
HausmeisterIn

user image
Schau Dir doch mal die Dokumentation zu sprintf() an: http://perldoc.perl.org/functions/sprintf.html

perldoc -f sprintf
...
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
* (minimum) width

Arguments are usually formatted to be only as wide as required to display the given value. You can override
the width by putting a number here, or get the width from the next argument (with * ) or from a specified
argument (e.g., with *2$):

printf "<%s>", "a"; # prints "<a>"
printf "<%6s>", "a"; # prints "< a>"
printf "<%*s>", 6, "a"; # prints "< a>"
printf '<%*2$s>', "a", 6; # prints "< a>"
printf "<%2s>", "long"; # prints "<long>" (does not truncate)

If a field width obtained through * is negative, it has the same effect as the - flag: left-justification.
...


edit: code-tags eingefügt zur Rettung der Leerzeichen
Last edited: 2013-07-30 14:31:24 +0200 (CEST)
meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!

View full thread Text-Datei in mehrere Dateien splitten