add a line at the end of a file using shell scripting

Hi All ,
I am new to shell scripting.
i have a shell script(which is executed as a super user) , i want to it to do one more job for me. ie mounting a directory over other using lofs .
i have done it manually using
1) using mount command
mount -F lofs /export/home/dju /dju
2) putting an entry into the end of /etc/vstab file
/export/home/dju - /dju lofs - yes -

how can i do this in shell script .

can somebody help me.

Regards
Aki

Try this.. it may help you.

echo "<Text need to add end of File >"  >>  /etc/vstab 

thanks 4 ur reply !!
can i be sure that line will be appended at the end of file.?:confused:
Also how can i perform mount command ...:slight_smile:

Yes it will be added at the end of the line.

For mount command :

man mount

A command in a script is not different from a command you write at the command line, except you write it in a file instead, and chmod +x the file. You should probably also have an explicit #!/bin/sh at the top of the file.