Skip to content

Instantly share code, notes, and snippets.

@snowleung
Created January 12, 2013 10:07
Show Gist options
  • Save snowleung/4517056 to your computer and use it in GitHub Desktop.
Save snowleung/4517056 to your computer and use it in GitHub Desktop.
check the 2x file
#!/bin/sh
#check 2x file
FILE_PAR='*@2x.*'
file_res=$(find . -name "$FILE_PAR")
#echo $file_res
for f in $file_res
do
fname=`basename $f`
match_name=${fname/'@2x'/''}
current_dir=`dirname $f`
dname=${current_dir##*'/'}
match_dir=$current_dir'/'$dname'Low'
match_root=$match_dir'/'$match_name
if [ ! -f $match_root ]
then
echo $match_root 'not exist'
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment