Banner (유닉스)
운영 체제 | 유닉스 및 유닉스 계열 |
---|---|
종류 | 명령어 |
banner(배너)는 명령 줄 변수에 지정되는 텍스트를 대형 아스키 아트 버전의 텍스트로 출력시키는 유닉스 및 유닉스 계열 운영 체제의 프로그램이다.
출력 예시
터미널 지향 배너 프로그램에서:
$ banner 'Hello!'
# # ###
# # ###### # # #### ###
# # # # # # # ###
####### ##### # # # # #
# # # # # # #
# # # # # # # ###
# # ###### ###### ###### #### ###
BSD 및 파생판에서 흔히 볼 수 있는 프린터 지향 배너 프로그램의 한 문자:
$ banner -w80 "a"
#####
#########
############### ###
################ ######
################## ########
##### ##### #########
#### #### ## ###
### #### ##
### ### ##
### ### ###
#### ### ####
#############################
##############################
##############################
############################
###########################
###
#
#
약 1000초의 지속적인 시각을 표시:
function repeat(){
for ((i=0;i<$1;i++)); do
eval ${*:2}
}
or that definition can be avoided by replacing the repeat command with a while loop, like this:
$ i=0 ; while (($i<1000)); do sh -c '( clear ; date +" %H.%M.%S" | xargs banner ; sleep 1 ; ((i=$i+1)))' ; done
}[a]
$ repeat 1000 sh -c '( clear ; date +" %H.%M.%S" | xargs banner ; sleep 1)'
# ##### # ##### ####### #######
## # # ## # # # #
# # # # # # # #
# ###### # ##### ###### ######
# # # ### # # ### # #
# # # ### # # ### # # # #
##### ##### ### ##### ####### ### ##### #####
각주
- ↑ It can also be done using FIGlet utility with the substitution of
banner
withfiglet -f banner
외부 링크
- Manual – 4.2BSD Games