[plug] script

Jon Miller jlmiller at mmtnetworks.com.au
Sun Aug 4 09:55:39 WST 2002


Like to know how do I go about adding a new line to a file (is it using \n
on the last input?) where information is being written to.  In other words
the script prompts for information and once it gets to the end of that 
record" I need it to start on the next line in the "result" file and record
the next record.  It needs to do this until the data input is completed. 
What I have to do is create a do-while to let the program know how many
records are being inputted.  Once this is completed, it needs to "write or
close the result file with the number of records recorded.

On the following function, is the following correct? I want to prompt the
user to enter how many records are to be created, store that value to recnum
  When the function runs it needs to that pass the value of recnum to the
function

function numrec()
{
echo -n " Enter number of records to input: "
       read recnum
}

recount(recnum); # function that recieves the value of recnum in a for
statement.

function recount(recnum)
{
for ((rcountount<do echo "record: $rcount";
done
}


Thanks


Jon L. Miller
MMT Networks Pty Ltd



More information about the plug mailing list