Line 140: |
Line 140: |
| usage | | usage |
| fi | | fi |
| + | |
| + | :I am wondering why we are using perl to replace as we can also use sed and if readability is not an issue we can do the whole CDATA tag conversin at once |
| + | : <pre>sed -e 's/<!\[CDATA\[/STARTCDATA/g' -e 's/\]\]>/ENDCDATA/g' -e 's/\]\]>/ENDCDATA/g' -e 's/\]\]>/ENDCDATA/g' -e 's/\]\]>/ENDCDATA/g' < /path/to/orignal.file > /path/to/conversion.file</pre> |
| + | |
| + | : And back |
| + | |
| + | : <pre>sed -e 's/STARTCDATA/<!\[CDATA\[/g' -e 's/ENDCDATA/\]\]>/g' -e 's/AMP/\&/g' < /path/to/conversion.file > /path/to/new.file</pre> |
| + | |
| + | : On top off that I would retrieve the numeric value for C like this, which saves you some mathematics |
| + | : <pre>C=`cat $1 |grep '<entry>' |wc -l`</pre> |
| + | |
| + | : [[User:Cactus|Cactus]] 15:12, 3 February 2008 (MST) |
| | | |
| ====newpomerge==== | | ====newpomerge==== |