12 lines
203 B
Bash
Executable File
12 lines
203 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
capture=""
|
|
if [[ $# -eq 1 ]]
|
|
then
|
|
capture="\1H,\2M,\3s"
|
|
else
|
|
capture="\1H,\2M"
|
|
fi
|
|
|
|
acpi -b | sed "s/.*\([0-9][0-9]\):\([0-9][0-9]\):\([0-9][0-9]\).*/$capture/g" | xargs echo
|