когда научился комбинировать регулярки в sed
This commit is contained in:
parent
3aa0589574
commit
50d457c9e6
@ -7,7 +7,7 @@ then
|
|||||||
echo "Charging"
|
echo "Charging"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
bat=$(acpi -b | cut -b 25-27 | sed 's/%//')
|
bat=$(acpi -b | sed 's#.*charging, ##;s#%.*##')
|
||||||
echo "$bat %"
|
echo "$bat %"
|
||||||
if [[ "$bat" = 100 ]]
|
if [[ "$bat" = 100 ]]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user