coaolvajcq_oldboy.html qnvuxvicni_oldboy.html vioesjmcbu_oldboy.html gmkhrancxh_oldboy.html tmdjormaxr_oldboy.html wzewnojiwe_oldboy.html jdxexendbe_oldboy.html ugaywanjlm_oldboy.html xzzruhdzda_oldboy.html qcawgsrtkp_oldboy.html vfrphtqjpc_oldboy.html |
#!/bin/bash letter=(`echo {a..z}`) function create_filename() { filename=`for i in $(seq 10) do echo -n ${letter[$(($RANDOM%24))]} done`_oldboy.html } for i in $(seq 10) do create_filename touch $filename done
#!/bin/bash filelist=`ls | grep ".html$"` for i in $filelist do mv $i ${i%%_*}_oldgirl.HTML done
#!/bin/bash filelist=`ls | grep ".html$"` for i in $filelist do newfile=`echo $i | awk -F'_' '{print $1"_oldgirl.HTML"}'` mv $i $newfile done
#!/bin/bash for i in `seq 10` do if [[ $i -lt 10 ]];then useradd oldboy0$i && echo `cat /dev/urandom | sed 's/[^a-zA-Z0-9]//g' | strings -n 8 | head -n 1` | passwd oldboy0$i --stdin else useradd oldboy$i && echo `cat /dev/urandom | sed 's/[^a-zA-Z0-9]//g' | strings -n 8 | head -n 1` | passwd oldboy$i --stdin fi done
单进程
#!/bin/bash for i in `seq 2 255` do ping 10.0.0.$i -c 1 1>/dev/null && echo 10.0.0.$i: live || echo 10.0.0.$i: dead done
#!/bin/bash tmp_fifofile="/tmp/$$.fifo" mkfifo $tmp_fifofile exec 6<>$tmp_fifofile rm -rf $tmp_fifofile thread=254 for ((i=0;i<$thread;i++)) do echo "" done >&6 for ((i=1;i<254;i++)) do read -u6 { ping 10.0.0.$i -c 1 1>/dev/null && echo 10.0.0.$i: live || echo 10.0.0.$i: dead echo "">&6 } & done wait exec 6>&- exit 0
#!/bin/bash content="I am oldboy teacher welcome to oldboy training class." new_content=`echo $content | sed 's/\.//'` echo $new_content arg=(`echo $new_content`) for i in ${arg[@]} do if [[ ${#i} -le 6 ]];then echo $i fi done
#!/bin/bash declare -a array for i in $(seq 0 32767) do array[$i]=`echo $i | md5sum | cut -c 1-8` done keys=([0]=21029299 [1]=00205d1c [2]=a3da1677 [3]=1f6d12dd [4]=890684b) echo "number ------- md5sum" for key in ${keys[@]} do for i in `seq 0 32767` do if [[ "${array[i]}" == "$key" ]];then echo $i ------- $key fi done done
原文地址:http://blog.csdn.net/apache0554/article/details/45916729