I am very new to linux and am sorry for the newbie questions.
I had a homework extra credit question that I was trying to do but failed to get it. 

> 
> Q. Write a security shell script that logs the following information
>  for every process: User ID, time started, time ended (0 if process is
>  still running), whether the process has tried to access a secure file
>  (stored as either yes or no) The log created is called
>  process\_security\_log where each of the above pieces of information is
>  stored on a separate line and each entry follows immediately (that is,
>  there are no blank lines). Write a shell script that will examine
>  this log and output the User ID of any process that is still running
>  that has tried to access a secure file.
> 
> 
> 

I started by trying to just capturing the User and echo it but failed.

```
output=`ps -ef | grep [*]`
set -- $output
User=$1
echo $User

```