Current Path : /compat/linux/proc/68247/root/compat/linux/proc/68247/root/compat/linux/usr/share/doc/bash-3.2/scripts/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/68247/root/compat/linux/proc/68247/root/compat/linux/usr/share/doc/bash-3.2/scripts/scrollbar |
#!/bin/bash # # scrollbar - display scrolling text # # usage: scrollbar args # # A cute hack originally from Heiner Steven <hs@bintec.de> # # converted from ksh syntax to bash v2 syntax by Chet Ramey WIDTH=${COLUMNS:-80} WMINUS=$(( $WIDTH - 1 )) [ $# -lt 1 ] && set -- TESTING # use the bash-2.02 printf builtin Text=$(printf "%-${WIDTH}s" "$*") Text=${Text// /_} while : do printf "%-.${WIDTH}s\r" "$Text" LastC=${Text:${WMINUS}:1} Text="$LastC""${Text%?}" done