doushu5451 2019-07-07 00:11
浏览 198

如何命名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.

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试
    • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
    • ¥15 教务系统账号被盗号如何追溯设备
    • ¥20 delta降尺度方法,未来数据怎么降尺度
    • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
    • ¥15 再不同版本的系统上,TCP传输速度不一致
    • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
    • ¥15 DIFY API Endpoint 问题。
    • ¥20 sub地址DHCP问题