Last change
on this file was
105,
checked in by cecile, 12 years ago
|
Hufmann case study
|
-
Property svn:executable set to
*
|
File size:
397 bytes
|
Rev | Line | |
---|
[105] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | file=$1/protect_output.reg |
---|
| 4 | |
---|
| 5 | output=$1/safe_rob1.ctl |
---|
| 6 | value=0 |
---|
| 7 | |
---|
| 8 | while read line |
---|
| 9 | do |
---|
| 10 | value=`expr $value + 1`; |
---|
| 11 | |
---|
| 12 | done <$file |
---|
| 13 | echo $value |
---|
| 14 | |
---|
| 15 | val=0 |
---|
| 16 | echo "!( " > $output |
---|
| 17 | while read line |
---|
| 18 | do |
---|
| 19 | val=`expr $val + 1`; |
---|
| 20 | if [ $val -eq $value ] |
---|
| 21 | then |
---|
| 22 | echo "(${line} = 1 ^ ${line}G = 0)" >> $output |
---|
| 23 | else |
---|
| 24 | echo "(${line} = 1 ^ ${line}G = 0) * " >> $output |
---|
| 25 | fi |
---|
| 26 | |
---|
| 27 | done <$file |
---|
| 28 | echo ");" >> $output |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | |
---|
Note: See
TracBrowser
for help on using the repository browser.