Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
linux_faq:bash_bits_operations [2020/12/07 12:53] – [Как обойтись без файлика] admin | linux_faq:bash_bits_operations [2020/12/08 21:09] (current) – [Как обойтись без файлика] admin | ||
---|---|---|---|
Line 66: | Line 66: | ||
block_size=32768 | block_size=32768 | ||
count=$(( $disk_size / $block_size )) | count=$(( $disk_size / $block_size )) | ||
+ | red=`tput setaf 1` | ||
+ | green=`tput setaf 2` | ||
+ | reset=`tput sgr0` | ||
+ | |||
echo "Disk: ${disk}, Disk Size in bytes: ${disk_size}, | echo "Disk: ${disk}, Disk Size in bytes: ${disk_size}, | ||
echo " | echo " | ||
Line 83: | Line 87: | ||
if [ " | if [ " | ||
- | echo "Check with ones passed... Disk is OK! " | + | echo "Check with ones passed... |
else | else | ||
- | echo "Check with ones failed... Disk is BAD!" | + | echo "Check with ones failed... |
fi | fi | ||
Line 104: | Line 108: | ||
if [ " | if [ " | ||
- | echo "Check with zeroes | + | echo "Check with ones passed... |
else | else | ||
- | echo "Check with zeroes | + | echo "Check with ones failed... |
fi</ | fi</ |