Skip to content

Instantly share code, notes, and snippets.

View imom0's full-sized avatar
💭
I may be slow to respond.

iMom0 imom0

💭
I may be slow to respond.
View GitHub Profile
@imom0
imom0 / xjtulib.sh
Created March 10, 2011 11:32
A shell script to get the 150 IPs of xjtu lib.
#!/bin/sh
lock=/tmp/mac_lock
wlan=wlan0
essid=xjtu_lib
mac_base="C9:1A:B9:6B:6C:"
function req_addr() {
if [ -f "$lock" ]
then
top - 13:26:22 up 49 min, 2 users, load average: 1.49, 1.18, 0.87
Tasks: 136 total, 1 running, 135 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.7%us, 84.4%sy, 10.6%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Mem: 1803792k total, 1674232k used, 129560k free, 14356k buffers
Swap: 0k total, 0k used, 0k free, 595548k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4299 imom0 20 0 898m 671m 613m S 92.8 38.1 6:39.06 VirtualBox
1254 root 20 0 171m 78m 17m S 1.7 4.5 1:52.98 Xorg
4366 imom0 20 0 113m 31m 19m S 1.7 1.8 0:08.70 pidgin