<!ELEMENT textdump (file, content)> <!ATTLIST textdump base CDATA #IMPLIED mode CDATA #IMPLIED> |
This element occurs in the elements alfs, else, stage. and then
The sub-element file contains the name of the file to be created.
The sub-element content is used to specify the content of the file being created when processing a textdump operation. When processing the textual content of this element, one removes the leading blanks up to and including a '=' character.
The attribute base allows to specify the directory in which the file creation will be perforemd.
The attribute mode allows to specify the append creation mode
<textdump base="/etc"> <file>group</file> <content> =root:x:0: =bin:x:1: =sys:x:2: =kmem:x:3: =tty:x:4: =tape:x:5: =daemon:x:6: =floppy:x:7: =disk:x:8: =lp:x:9: =dialout:x:10: =audio:x:11: </content> </textdump> |
The equivalent bash script is :
cd /etc cat > group << 'EOF' root:x:0: bin:x:1: sys:x:2: kmem:x:3: tty:x:4: tape:x:5: daemon:x:6: floppy:x:7: disk:x:8: lp:x:9: dialout:x:10: audio:x:11: EOF |
<textdump mode="append"> <file>/etc/sysconfig/network</file> <content> =GATEWAY=192.168.123.254 =GATEWAY_IF=eth0 </content> </textdump> |
The equivalent bash script is :
echo Generating file /etc/sysconfig/network cat >> /etc/sysconfig/network << 'EOF' GATEWAY=192.168.123.254 GATEWAY_IF=eth0 EOF |