Magellan Linux

Diff of /trunk/mage/usr/lib/mage/writeprotected

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 76 by niro, Tue Feb 15 22:59:14 2005 UTC revision 77 by niro, Wed Jun 1 15:47:06 2005 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # version: 0.3.6-r13  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/writeprotected,v 1.8 2005-06-01 15:47:06 niro Exp $
3    
4  FILE="$1"  FILE="$1"
5  DIR="$(dirname "${FILE}")"  DIR="$(dirname "${FILE}")"
# Line 24  else Line 24  else
24   #exp COUNTER may be 0901   #exp COUNTER may be 0901
25   # exp ${COUNTER} + 1 is 902 NOT 0902   # exp ${COUNTER} + 1 is 902 NOT 0902
26    
27   COUNTER=${COUNTER/$(expr ${COUNTER} + 0)/$(expr ${COUNTER} + 0001)}   #COUNTER=${COUNTER/$(expr ${COUNTER} + 0)/$(expr ${COUNTER} + 0001)}
28    
29     # the same without need of expr
30     COUNTER=${COUNTER/$((${COUNTER} + 0))/$((${COUNTER} + 0001))}
31  fi  fi
32    
33  echo ${COUNTER}  echo ${COUNTER}

Legend:
Removed from v.76  
changed lines
  Added in v.77