summaryrefslogtreecommitdiffstats
path: root/sanity/dev_sanity/counter.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sanity/dev_sanity/counter.sh')
-rwxr-xr-xsanity/dev_sanity/counter.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/sanity/dev_sanity/counter.sh b/sanity/dev_sanity/counter.sh
new file mode 100755
index 0000000..37df892
--- /dev/null
+++ b/sanity/dev_sanity/counter.sh
@@ -0,0 +1,17 @@
+#set -x
+#check for file named in 5-digit numbers and increment it - sanity_counter
+cd /sanity/test/counter
+ls [0-9][0-9][0-9][0-9][0-9] | while read fn;
+do
+id=$fn
+new=`expr $id + 1`
+rm $id
+echo $id #sanity_id
+if [ $new -eq 100000 ]
+ then
+ touch 10000
+
+ else
+ touch $new
+fi
+done