Pages

Thursday, 1 March 2012

How to use EOF

EOF works some what like this:
Command << EOF
Execute line1
Execute line2
.
.
.
Execute line"n"
EOF

Description: So the above command is executed and after that all the line below it are executed unless EOF is found which means End Of File

example:

#useradd user1
#passwd user1 << EOF
new-password
new-password
EOF

No comments:

Post a Comment