Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

fucking bash

Name: Anonymous 2009-08-18 18:48

soup /prog/?
I'm trying to lern bash but i fucking suck, can anyone tell me what the fuck is wrong with this script?
inb4 n00b, linux sucks, ect.


#!/bin/bash
TMPFILE="/tmp/$$"
trap "{ rm -f $TMPFILE; exit 255; }" SIGINT SIGTERM EXIT
touch $TMPFILE
for ((i=100;i<116;i++)); do
{ ping -c1 192.168.1.$i 1>/dev/null & }
if [ "$?" == "0" ];then
echo " ■  192.168.1.$i" >> $TMPFILE
else
echo " ■  192.168.1.$i" >> $TMPFILE
fi
done
sleep 2
clear
cat $TMPFILE
exit 0

also is there a simple bash one liner to determine dhcp hostnames?
(first post in the text boards btw, bbcode works here right?)

Name: Anonymous 2009-08-18 19:17

>>3
Then this should already be a learning experience then.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List