#!/bin/bash
if [ -z "$1" ]; then
	sed 's/...$//' </sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
	sed 's/...$//' </sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
	exit
fi
hi="$1"
lo="$2"
if [ -n "$lo" ] && [ "$lo" -gt "$hi" ]; then
	x="$lo"
	lo="$hi"
	hi="$x"
fi
echo ${hi}000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
if [ -n "$lo" ]; then
	echo ${lo}000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
fi
