#! /bin/bash
xzh=“/1/2/3/4”
if [ ! -e $xzh ]
then
mkdir -p $xzh
fi
#!/bin/bash
read -p "please set file:" n
if[ ! -e $n ]
touch $n
n=
cat iplist
for IP in $n
do
ping -c 3 -i 0.2 -w 3 $IP &> /dev/null
if [ $? -eq 0 ] ; then
echo "Host $IP is on-line."
else
echo "Host $IP is off-line."
done
read -p "please set directory:" n
if [ ! -e $n ]
mkdir -p $n
echo "this $n directory exist"