Cambia tu bucle más interno:
# tühikud
for((j = 2; j < $tarn;j++))
do
echo -n " "
done
a
# tühikud
for((j = 2; j < $tarn;j++))
do
if [ "$i" -eq "$(( (rida+1) / 2 ))" ] && [ "$j" -eq "$(( (tarn+1) / 2 ))" ]; then
echo -n '* '
else
echo -n " "
fi
done
Es decir, cuando detecte que está a punto de generar el -carácter central, inserte un *
en lugar de un espacio.
Para una colocación un poco más precisa en la fila:
# tühikud
for((j = 2; j < $tarn;j++))
do
if [ "$i" -eq "$(( (rida+1) / 2 ))" ] && [ "$j" -eq "$(( (tarn+1) / 2 ))" ]; then
if [ "$(( tarn%2 ))" -eq 0 ]; then
echo -n ' *'
else
echo -n '* '
fi
else
echo -n " "
fi
done
En lugar de generar caracteres individuales, genere una fila completa a la vez. Esto es más eficiente y solo tiene que preocuparse por tres tipos de filas :filas superior/inferior, fila central y otras filas:
#!/bin/bash
read -r -p 'Height: ' rows
read -r -p 'Width : ' cols
topbottom=$( yes '*' | head -n "$cols" | tr '\n' ' ' )
printf -v midrow '*%*s*%*s*' "$(( cols - 2 ))" "" "$(( cols - 2 ))" ""
printf -v otherrows '*%*s*' "$(( 2*(cols - 2) + 1 ))" ""
for (( row = 0; row < rows; ++row )); do
if (( row == 0 )) || (( row == rows - 1 )); then
thisrow=$topbottom
elif (( row == rows / 2 )); then
thisrow=$midrow
else
thisrow=$otherrows
fi
printf '%2d %s\n' "$(( ++n ))" "$thisrow"
done
Драйвер был выпущен для всех основных ядер здесь
Согласно странице продукта , это предварительно -сертифицированное решение, и драйвер еще не опубликован.
Даже в ветке разработки Линуса ничего не раскрывается , поэтому я предполагаю, что на момент написания этой статьи она еще не совместима с Linux и В статье, о которой вы говорите, используется маркетинговая речь :. Мы добавим это в ближайшее время...
Просто обновите ядро Linux до последней версии >5.1 и используйте последнюю версию прошивки для беспроводного адаптера :https://www.intel.com/content/www/us/en/support/articles/000005511/network-and-i-o/wireless-networking.html