I hope this is possible, or i have just wrote a script for nothing!
I have a directory on my server '/var/log/user' which contains files with random names (based on date/time and random numbers). Each one of these files has the following layout:
variable1 variable2 variable3 variable4 variable5
I need the code to pick up one of these files, open it, put the contents of the file into $variable1 $variable2 ..... and then once it has done that, delete that file, so the script can then move on to the next file until it has read them all in, and no more files exist.
I have no idea how to do this, so help would be much appreciated.