#!/bin/bash
while [ 1 ]
do
BATTERY_PERCENTAGE_AVAILABLE=$(/cygdrive/c/Windows/System32/wbem/WMIC.exe Path Win32_Battery Get EstimatedChargeRemaining |\
/bin/grep -E "[0-9]" |\
/usr/bin/tr -d "\r")
if [ $BATTERY_PERCENTAGE_AVAILABLE -le 20 ]
then
/cygdrive/c/Windows/system32/taskmgr.exe >/dev/null 2>&1 &
elif [ $BATTERY_PERCENTAGE_AVAILABLE -ge 98 ]
then
/cygdrive/c/Windows/system32/taskmgr.exe >/dev/null 2>&1 &
fi
/bin/sleep.exe 300
done
b)Set WshShell = CreateObject("WScript.Shell" )
WshShell.Run chr(34) & "FullPath\LaptopBattery.CMD" & Chr(34), 0
Set WshShell = Nothing
c)@ECHO OFF
START /B Drive:\cygwin\bin\bash.exe "FULLPATH\LaptopBattery.sh"
ASKER
ASKER
#!/bin/bash
ssh shutdownuser@remotehost shutdown -h now
This assumes:ASKER
Networking is the process of connecting computing devices, peripherals and terminals together through a system that uses wiring, cabling or radio waves that enable their users to communicate, share information and interact over distances. Often associated are issues regarding operating systems, hardware and equipment, cloud and virtual networking, protocols, architecture, storage and management.
TRUSTED BY