Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while read line
- do
- fpath=$(echo "${line}" | cut -d':' -f2)
- if [ "${line: -1}" = "*" ];then
- err_flg=0
- for f in $(ls -1 ${fpath})
- do
- if [ ! -e "${f}" ];then
- err_flg=1
- fi
- done
- if [ ${err_flg} -eq 1 ];then
- echo "Error"
- else
- echo "${line}"
- fi
- else
- if [ -e "${fpath}" ];then
- echo "${line}"
- else
- echo "--Error"
- fi
- fi
- done < /root/work/a.list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement