int i=[int]5.8 [23 + 5]*2
marek@ubuntu:~/dev/bash$ echo "int i=(int)5.8 (23 + 5)*2" | tr "(" "[" | tr ")" "]"
shopt -s extglobroot@ubuntu:~/dev/python/tmp# for i in 1 2 3 4 5; do touch $i; done
#!/bin/bash
outer=1 # Set outer loop counter.
# Beginning of outer loop.
for a in 1 2 3 4 5
do
echo "Pass $outer in outer loop."
echo "---------------------"
inner=1 # Reset inner loop counter.
# ===============================================
# Beginning of inner loop.
for b in 1 2 3 4 5
do
echo "Pass $inner in inner loop."
let "inner+=1" # Increment inner loop counter.
done
# End of inner loop.
# ===============================================
let "outer+=1" # Increment outer loop counter.
echo # Space between output blocks in pass of outer loop.
done
# End of outer loop.
exit 0
find . -name '*.log' -mtime -2 -exec grep -Hc Exception {} \; | grep -v :0$
for i in {1..10}; do time curl http://localhost:8000 >/dev/null; done 2>&1 | grep real
root@ubuntu:~# for i in {1..10}; do time curl http://localhost:8000 >/dev/null; done 2>&1 | grep real
real 0m0.011s
real 0m0.006s
real 0m0.005s
real 0m0.006s
real 0m0.006s
real 0m0.005s
real 0m0.009s
real 0m0.011s
real 0m0.005s
real 0m0.005s
lsof / | awk '{ if($7 > 1048576) print $7/1048576 "MB" " " $9 " " $1 }' | sort -n -u | tail
clear;while x=0; do clear;date;echo "";echo " [Count] | [IP ADDR]";echo "-------------------";netstat -np|grep :80|grep -v LISTEN|awk '{print $5}'|cut -d: -f1|uniq -c; sleep 5;done