banner left Boxtec Banner
Platzhalter BoxtecProdukteForumShopKontaktPlaygroundn/aJobs
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

arm:pengpod_batteriestand_im_terminal [2013/07/03 21:14] (current)
boxtec created
Line 1: Line 1:
 +====== Batteriestand-Anzeige im Terminal (für PENGPOD ua.) ======
 +Beitrag von T.D. gemäss:   http://pengpod.com/pengwiki/index.php?title=Scripts
 +
 +===== Installation =====
 +Untenstehendes Skript mit  chmod 755  lauffähig machen und im  /home-Verzeichnis 
 +zB. als Datei **akku** ablegen.
 +
 +Aufruf danach im Terminal
 +<code bash>
 +./akku
 +</code>
 +
 +===== Skript =====
 +<code bash>
 +#!/bin/bash
 +# Script to show information about the battery
 +
 +# Collect the information from the system
 +INFO=$(grep -e "STATUS\|HEALTH\|CAPACITY" /sys/class/power_supply/battery/uevent | tr "=" " " | awk '{print $2}')
 +
 +# Split the information into different variables
 +STATUS=$(echo $INFO | awk '{print $1}')
 +HEALTH=$(echo $INFO | awk '{print $2}')
 +CAPACITY=$(echo $INFO | awk '{print $3}')
 +
 +# Show the information
 +echo "Status: $STATUS"
 +echo "Health: $HEALTH"
 +echo "Capacity: $CAPACITY"
 +</code>
 +
  
 
arm/pengpod_batteriestand_im_terminal.txt · Last modified: 2013/07/03 21:14 by boxtec
 
 

zum Seitenanfang

Letzte Aktualisierung: © boxtec internet appliances · the better security products