Q:

Bash Redirecting Output From Multiple Functions to A File

I am trying to make a script that will redirect some output from a couple of functions to a file.  Here is what my code looks like. 
#! /bin/bash

touch /var/log/test.log
results=/var/log/test.log

outputFormat()
{
    echo "This is outputFormat" >> results
}

outputParseFull()
{

    echo "This is outputParseFull" >> results
    outputFormat;
}

outputParseFull;

After running this, /var/log/test.log is created but the file itself is blank.  I want the file to contain the following
This is outputParseFull
This is outputFormat
One line must be from each function.  What am I doing wrong here? 

A:

You're writing to a file named results, not using the filename in the variable $results.  
echo "This is outputParseFulll" >> results

should be 
echo "This is outputParseFulll" >> $results

