3 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
4 ##############################################################################
5 # Copyright (c) 2015 The Linux Foundation and others.
7 # All rights reserved. This program and the accompanying materials
8 # are made available under the terms of the Eclipse Public License v1.0
9 # which accompanies this distribution, and is available at
10 # http://www.eclipse.org/legal/epl-v10.html
13 # Thanh Ha (The Linux Foundation) - Initial implementation
14 ##############################################################################
18 echo "Scanning $directory"
19 while IFS= read -r -d '' x
21 if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then
22 echo "file $x contains non-ascii characters"
25 done < <(find "$directory" -type f -print0)
27 echo "All files are ASCII only"