Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while read; do
- # trim the filename
- FILE=$(echo "$REPLY"| sed -e 's/^ *//' -e 's/ *$//')
- # check if the file exists
- if [ -f "$FILE" ]; then
- break
- else
- echo "Can't read this file. Please drop a valid one."
- echo "'$FILE'"
- fi
- done
- # check if there are EAs
- echo ""
- LINES=$(xattr -l "$FILE"|wc -l)
- if [ "$LINES" -eq "0" ]; then
- echo "Can't fix this file"
- echo "There are no extended attributes associated."
- exit 1
- fi
- # now remove the EAs
- echo ""
- xattr -c "$FILE" &>/dev/null
- echo "You can now open this file in QT7."
Advertisement
Add Comment
Please, Sign In to add comment