diff options
author | Lakshmipathi <lakshmipathi.g@gmail.com> | 2011-07-04 08:41:13 +0530 |
---|---|---|
committer | Lakshmipathi <lakshmipathi.g@gmail.com> | 2011-07-04 08:41:13 +0530 |
commit | cc9f3473469afaccffe917d177c9bb29a3d5a090 (patch) | |
tree | 191d12088c8307e45d1091df87fd031f91ebe3ed /sanity/dev_sanity/counter.sh | |
parent | bc1de0dacec396c17c31453f9ea77e0740a27eac (diff) |
added dev-sanity script
Diffstat (limited to 'sanity/dev_sanity/counter.sh')
-rwxr-xr-x | sanity/dev_sanity/counter.sh | 17 |
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 |