Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/wapython
Path: blob/main/core/coreutils/src/uniq-sources.sh
1067 views
1
#!/bin/sh
2
3
export A=`find . | grep .c$ | xargs -n1 basename | wc -l`
4
5
export B=`find . | grep .c$ | xargs -n1 basename |sort | uniq | wc -l`
6
7
if [ $A -eq $B ]; then
8
echo "good -- $A unique sources files"
9
else
10
echo "ERROR: duplicate sources!"
11
exit 1
12
fi
13