I have a simple awk script that compares two files and outputs to a file. How would I make each output file name unique?
I would like to have the user input a name and make the output file name equal the users input.
$output = shell_exec('awk -F, \'NR==FNR{seen[$0]++;next} ($1 in seen)\' uploads/a.txt uploads/b.txt > exports/output.txt');
each output file should have a unique name so it doesn't overwrite the file each time.