Not bad and wrong, just the best of a bad situation. The dos shell is pitiful and won't let you write grotesque things like this:
echo "Connections, Average, Min, Max" ; ((for a in dos*Fri*; do echo -n `echo $a | sed 's/dos\(.*\)-.*/\1/'` ; grep time $a | cut -d' ' -f 3 | perl -e '($min,$max,$a,$t)=(65535,0,0,0); while (<>) {chomp; next if $_ eq ""; $a += $_; $t++; $max=$_ if ($_ > $max); $min = $_ if ($_ < $min);} print ", ".($a/$t).", $min, $max\n";' ; done) | sort -n)
or this:
for a in * ; do if [[ -d $a ]] ; then cd $a ; A=`ls| grep tr.xml$`; if [[ -z $A ]]; then tr.enum -x `ls|grep nmap.xml` -X tr.xml > tr.log ; fi ; cd ..; fi; done
Comments 11
But, I had to comment anyway, to say: cute icon!
Reply
Reply
Reply
echo "Connections, Average, Min, Max" ; ((for a in dos*Fri*; do echo -n `echo $a | sed 's/dos\(.*\)-.*/\1/'` ; grep time $a | cut -d' ' -f 3 | perl -e '($min,$max,$a,$t)=(65535,0,0,0); while (<>) {chomp; next if $_ eq ""; $a += $_; $t++; $max=$_ if ($_ > $max); $min = $_ if ($_ < $min);} print ", ".($a/$t).", $min, $max\n";' ; done) | sort -n)
or this:
for a in * ; do if [[ -d $a ]] ; then cd $a ; A=`ls| grep tr.xml$`; if [[ -z $A ]]; then tr.enum -x `ls|grep nmap.xml` -X tr.xml > tr.log ; fi ; cd ..; fi; done
Reply
if [ $x -eq $X ]; then printf $H; else printf $S; fi; x=$((x+1)); done;
printf $T"\n"; }; Z=1 X=0; while [ 1 ]; do clear; fn; X=$((X+Z));
if [ $((L-1)) -eq $X ]; then Z=-1; fi; if [ 0 -eq $X ]; then Z=1; fi; d=0;
while [ $d -lt $D ]; do d=$((d+1)); done; done
is comically obscene.
For simplicity, I quite like
:(){ :|:&};:
Don't try running it though
Reply
Cygwin is my friend.
Reply
Reply
Reply
Leave a comment