首页 > 代码库 > bash Cheatsheet

bash Cheatsheet

#!/bin/bash
filename="$1"
while read -r line || [[ -n "$line" ]]
do
name="$line"
echo "Name read from file - $name"

done < "$filename"
echo $name
arr_name=(${name//|/ })
echo ${arr_name[1]}
set level = ${arr_name[1]}

echo $level
if [ $level -gt 100 ]
then
echo "yes"
fi

bash Cheatsheet