Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- [[ -d xyz ]] && rm -rf xyz
- mkdir -p xyz/foo
- res=0
- failed=0
- ls -d xyz/* | while read d ; do
- echo "d=$d"
- if [[ -f "xyz/$d/notexisting" ]] ; then
- echo "OK"
- else
- res=1
- failed=1
- echo "Failed"
- exit 1
- echo "Still alive?"
- fi
- done
- echo "res=$res failed=$failed"
- rm -rf xyz
- exit $res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement