когда научился комбинировать регулярки в sed
This commit is contained in:
parent
3aa0589574
commit
50d457c9e6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user