sell 进阶

删除shell函数:命令格式:unsrt function_name

创建函数:例

function func2 { echo fun2;}

 

fork  炸弹;:(){ :|&};:

脚本:

cat  Bomb.sh

#!/bin/bash

./$0./$0&

信号捕捉

trap ‘ehcho trap 15’ 15

for ((i=0: i<=100:i++)):do

echo $i

sleep 0.5

done

 

创建格子脚本

vim chess.sh

for i  in {1..8};do

for j in {1..4};do

if [$[i%2] -eq o ] ; then

echo -e “\033[1;42m \033 [0m\033[1;45 \033[0m\c”

else

echo -e “\033[1;45m \033 [0m\033[1;42 \033[0m\c”

fi

done

echo

done

 

生成随机字符;openssl  rand -base64

 

99乘法 脚本;

for i in {1..9} ;do

for j in `seq 1 $i `;do

result=$[$j * $i]

echo -e “s{j} x $ {i}=$result\c”

done

echo

done

 

扫描 IP   vim scanip.shnet=某ip地址

for i in {1..254};do

{if ping -cl -wl |sum; $i &> /dev/null;then

echo $net . $i is up

else

echo $net.$i is down

fi;}

done

wait

 

QQ截图20180510210407

本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/98090

(0)
你的命字你的命字
上一篇 2018-05-10
下一篇 2018-05-10

相关推荐