如何命名awk脚本的输出文件?

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.

dongyan8896
dongyan8896 看一下tempnam函数来生成一个唯一的文件名。
大约一年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐