source: caseStudy_Huffmann/huffmann/huff_reset/safe.sh

Last change on this file was 105, checked in by cecile, 14 years ago

Hufmann case study

  • Property svn:executable set to *
File size: 397 bytes
RevLine 
[105]1#!/bin/bash
2
3file=$1/protect_output.reg
4
5output=$1/safe_rob1.ctl
6value=0
7
8while read line
9do
10 value=`expr $value + 1`;
11
12done <$file
13echo $value
14
15val=0
16echo "!( " > $output
17while read line
18do
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
27done <$file
28echo ");" >> $output
29
30
31
Note: See TracBrowser for help on using the repository browser.