когда научился комбинировать регулярки в sed

This commit is contained in:
паша душный 2023-05-03 19:17:46 +03:00
parent 3aa0589574
commit 50d457c9e6

View File

@ -7,7 +7,7 @@ then
echo "Charging"
exit 0
fi
bat=$(acpi -b | cut -b 25-27 | sed 's/%//')
bat=$(acpi -b | sed 's#.*charging, ##;s#%.*##')
echo "$bat %"
if [[ "$bat" = 100 ]]
then