shell中的while read用法

#!/bin/sh
path_process_list=/opt/process.list
cat $path_process_list | while read i
do
        if [ x"$(ps -Af | grep "$i" | grep -v grep)" == x"" ] ; then
                $i &
        fi
done

原文地址:https://www.cnblogs.com/mycats/p/4343491.html