0
나는 "제작자 : Keegan Kuhn"이라고 적힌 Bash 스크립트를로드 할 때 배너에 넣었습니다. 그러나 텍스트를 가운데에 맞출 수 없습니다. 태초에이 텍스트는 왜 가운데에 있지 않습니까?
, 나는 여러 가지 빛깔 텍스트를 만들기 위해 몇 가지 색상을 정의 :
# Defines colors
black='tput setaf 0'
red='tput setaf 1'
green='tput setaf 2'
yellow='tput setaf 3'
purple='tput setaf 4'
pink='tput setaf 5'
skyBlue='tput setaf 6'
white='tput setaf 7'
grey='tput setaf 8'
나는 문제가 지난 몇 줄에있는 부분 :
string="Disguise your MAC Address as that of any manufacturer as you want."
sleep .2; printf "%*s\n" $(((${#string} + $(tput cols))/2)) "$string" # Centers variable "string"
echo
string="$($skyBlue)Made by:$($green) Keegan Kuhn ($($red)keeganjk$($green))"
sleep .2; printf "%*s\n" $(((${#string} + $(tput cols))/2)) "$string" # Centers variable "string"
왜 텍스트 앉아있다 센터링하지 않고 왼쪽으로?
으로 바꿉니다. 가운데 정렬되지 않은 두 번째 문자열입니까? – 123