Mailinglist Archive: opensuse-de (539 mails)
| < Previous | Next > |
Re: Zeilen live zählen
- From: David Haller <dnh@xxxxxxxxxxxx>
- Date: Thu, 6 Oct 2011 12:18:48 +0200
- Message-id: <20111006101848.GA3745@grusum.endjinn.de>
Hallo,
Am Thu, 06 Oct 2011, Roman Fietze schrieb:
RTFM ihr beide! Und zwar man 3 printf
==== man 1 printf ====
FORMAT controls the output as in C printf.
[..]
SEE ALSO
printf(3)
====
sowie
==== info coreutils 'printf invocation' ====
`printf' prints the FORMAT string, interpreting `%' directives and
`\' escapes to format numeric and string arguments in a way that is
mostly similar to the C `printf' function. *Note `printf' format
directives: (libc)Output Conversion Syntax, for details.
====
also: info libc 'Output Conversion Syntax'
for ((i=100;i>0;i--)); do printf '\r% 3i' "$i"; usleep 20000; done; echo
[..]
Vgl. man 1p printf, man 3 printf, man 3p printf, perldoc -f printf.
HTH,
-dnh
--
Beware of bugs in the above code; I have only proved it correct, not tried it.
- Donald Knuth
--
Um die Liste abzubestellen, schicken Sie eine Mail an:
opensuse-de+unsubscribe@xxxxxxxxxxxx
Um den Listen Administrator zu erreichen, schicken
Sie eine Mail an: opensuse-de+owner@xxxxxxxxxxxx
Am Thu, 06 Oct 2011, Roman Fietze schrieb:
On Thursday, 06.October.2011 09:46:45 Andre Tann wrote:
Ich habe jetzt:
for ((i=100;i>0;i--)); do printf '\r%b ' "$i"; usleep 20000; done; echo
Funktioniert, aber auch hier gefällt mir immer noch nicht, daß hinter %b
ein paar Leerzeichen eingefügt werden müssen, damit die Zahl richtig
erscheint. Gibt es eine Möglichkeit zu sagen: $i schreiben, Rest der
Zeile löschen?
for ((i=100;i>0;i--)); do printf '\r%b\e[K' "$i"; usleep 20000; done; echo
RTFM ihr beide! Und zwar man 3 printf
==== man 1 printf ====
FORMAT controls the output as in C printf.
[..]
SEE ALSO
printf(3)
====
sowie
==== info coreutils 'printf invocation' ====
`printf' prints the FORMAT string, interpreting `%' directives and
`\' escapes to format numeric and string arguments in a way that is
mostly similar to the C `printf' function. *Note `printf' format
directives: (libc)Output Conversion Syntax, for details.
====
also: info libc 'Output Conversion Syntax'
for ((i=100;i>0;i--)); do printf '\r% 3i' "$i"; usleep 20000; done; echo
[..]
Warum schreibst Du (1) hinter printf - damit ich "man 1 printf" angucke?
So ist die offizielle Bezeichnung, auch sichtbar im Titel der man page.
Vgl. man 1p printf, man 3 printf, man 3p printf, perldoc -f printf.
HTH,
-dnh
--
Beware of bugs in the above code; I have only proved it correct, not tried it.
- Donald Knuth
--
Um die Liste abzubestellen, schicken Sie eine Mail an:
opensuse-de+unsubscribe@xxxxxxxxxxxx
Um den Listen Administrator zu erreichen, schicken
Sie eine Mail an: opensuse-de+owner@xxxxxxxxxxxx
| < Previous | Next > |