Попробуйте сценарий ниже. Он будет определять размер терминала для каждого входного слова, поэтому будет даже динамически обновляться, если вы измените размер терминала во время его работы.
#!/usr/bin/env bash
## Change the input file to have one word per line
tr ' ' '\n' < "$1" |
## Read each word
while read word
do
## Get the terminal's dimensions
height=$(tput lines)
width=$(tput cols)
## Clear the terminal
clear
## Set the cursor to the middle of the terminal
tput cup "$((height/2))" "$((width/2))"
## Print the word. I add a newline just to avoid the blinking cursor
printf "%s\n" "$word"
sleep 1
done
Сохраните его как ~/bin/foo.sh, сделайте его исполняемым (chmod a+x ~/bin/foo.sh) и передайте ему свой входной файл в качестве его первого аргумента:
foo.sh file