Script to check transfer was successful

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:
    Write a script that performs a post processing action:

The run time environment of the script has the following environment variablesavailable when the script is fired.

� TYPE: This can either be 'session' or 'file'. It indicates if transfer eventis a file or session event
� FILE: The file being transferred
� DIRECTION: This can be 'recv' or 'send'.Relative to the script, is thefile being sent or received.
� STARTSTOP: This can be 'start' or 'stop'. Specifies if we are at the startor end of a file or session transfer event.
� STATE: Either 'success', 'failed', or 'started'

You can assume that the script will be automatically executed on the followingevents (TYPE=session and STARTSTOP=start; TYPE=session andSTARTSTOP=stop; TYPE=file and STARSTOP=start;TYPE=file andSTARTSTOP=stop):

  1. Relevant commands, code, scripts, algorithms:

  2. The attempts at a solution (include all code and scripts):

Not sure where to start, scripting is new to me

  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
    Open University Foundation degree Computer science, UK

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

So, How do you check what a variable currently is?
Or how do you detect if a variable has a known value? This should look familiar

if [        ]

Hint: TYPE, FILE, DIRECTION, and STARTSTOP are variables that tell your code what to do.

can you give me a start as this in not in my comfort zone.