<!ELEMENT textdump (file, content)> <!ATTLIST textdump base CDATA #IMPLIED mode CDATA #IMPLIED>
This element occurs in : Element : <alfs> | Element: <stage>
See also : Element: <file> | Element : <content>
The element textdump is one of the top-level operation elements. It allows you to create a text file containing specified text.
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 you to specify the directory in which the file creation will be perforemd. See Element : <base>.
The attribute mode allows you 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