How can I make the output file of an awk command's name unique?How to add unique id to file name in cron...

Strong Password Detection in Python

Is "wissen" the only verb in German to have an irregular present tense?

How to use Adostop Eco stop bath?

My previous employer committed a severe violation of the law and is also being sued by me. How do I explain the situation to future employers?

Computer name naming convention for security

Compute Manhattan distance from origin given a set of left-right-step directions

Publishing papers seem natural to many, while I find it really hard to think novel stuff to pursue till publication. How to cope up with this?

What was the nature of the known bugs in the Space Shuttle software?

Findminimum of Integral

Is there a method for differentiating informative comments from commented out code?

What kind of Chinook helicopter/airplane hybrid is this?

Is it possible to complete a PhD in CS in 3 years?

Who goes first? Person disembarking bus or the bicycle?

Why do airports remove/realign runways?

Why did Old English lose both thorn and eth?

When do flights get cancelled due to fog?

QR codes, do people use them?

What is the meaning of "prairie-dog" in this sentence?

Deck of Cards with Shuffle and Sort functionality

Why is a mixture of two normally distributed variables only bimodal if their means differ by at least two times the common standard deviation?

What term do you use for someone who acts impulsively?

How many Jimmys can fit?

Was it ever illegal to name a pig "Napoleon" in France?

As a supervisor, what feedback would you expect from a PhD who quits?



How can I make the output file of an awk command's name unique?


How to add unique id to file name in cron job?How to add each output of awkMerging two different files with conditionsgrep for repeated values from pattern listhow to make a file with AWK from different linesPrint only unique lines that appear last in logfile based on date/timeHow can i print unique value of particular column and then print rest of the columns in next lineawk to sum the numbers(floating) and group it on a unique keyHow to use the awk output to construct the commandtext processing between 2 patterns in awk to give selective unique output






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I'm using the command:



$output = shell_exec('awk -F, 'NR==FNR{seen[$0]++;next} ($1 in seen)' uploads/a.txt uploads/b.txt > exports/output.txt');


How can I make the output.txt a unique name every time?










share|improve this question









New contributor



David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • How many different filenames do you expect to generate, and what kind of filesystem(s) are they being stored on?

    – Jeff Schaller
    34 mins ago











  • If you want it unique per execution, you can use output_$$.txt. $$ will get substituted by the pid of the execution.

    – unxnut
    21 mins ago


















0















I'm using the command:



$output = shell_exec('awk -F, 'NR==FNR{seen[$0]++;next} ($1 in seen)' uploads/a.txt uploads/b.txt > exports/output.txt');


How can I make the output.txt a unique name every time?










share|improve this question









New contributor



David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • How many different filenames do you expect to generate, and what kind of filesystem(s) are they being stored on?

    – Jeff Schaller
    34 mins ago











  • If you want it unique per execution, you can use output_$$.txt. $$ will get substituted by the pid of the execution.

    – unxnut
    21 mins ago














0












0








0








I'm using the command:



$output = shell_exec('awk -F, 'NR==FNR{seen[$0]++;next} ($1 in seen)' uploads/a.txt uploads/b.txt > exports/output.txt');


How can I make the output.txt a unique name every time?










share|improve this question









New contributor



David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm using the command:



$output = shell_exec('awk -F, 'NR==FNR{seen[$0]++;next} ($1 in seen)' uploads/a.txt uploads/b.txt > exports/output.txt');


How can I make the output.txt a unique name every time?







awk filenames






share|improve this question









New contributor



David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 35 mins ago









Jeff Schaller

47.5k11 gold badges69 silver badges154 bronze badges




47.5k11 gold badges69 silver badges154 bronze badges






New contributor



David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 39 mins ago









DavidDavid

12 bronze badges




12 bronze badges




New contributor



David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




David is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • How many different filenames do you expect to generate, and what kind of filesystem(s) are they being stored on?

    – Jeff Schaller
    34 mins ago











  • If you want it unique per execution, you can use output_$$.txt. $$ will get substituted by the pid of the execution.

    – unxnut
    21 mins ago



















  • How many different filenames do you expect to generate, and what kind of filesystem(s) are they being stored on?

    – Jeff Schaller
    34 mins ago











  • If you want it unique per execution, you can use output_$$.txt. $$ will get substituted by the pid of the execution.

    – unxnut
    21 mins ago

















How many different filenames do you expect to generate, and what kind of filesystem(s) are they being stored on?

– Jeff Schaller
34 mins ago





How many different filenames do you expect to generate, and what kind of filesystem(s) are they being stored on?

– Jeff Schaller
34 mins ago













If you want it unique per execution, you can use output_$$.txt. $$ will get substituted by the pid of the execution.

– unxnut
21 mins ago





If you want it unique per execution, you can use output_$$.txt. $$ will get substituted by the pid of the execution.

– unxnut
21 mins ago










0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






David is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f528747%2fhow-can-i-make-the-output-file-of-an-awk-commands-name-unique%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








David is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















David is a new contributor. Be nice, and check out our Code of Conduct.













David is a new contributor. Be nice, and check out our Code of Conduct.












David is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f528747%2fhow-can-i-make-the-output-file-of-an-awk-commands-name-unique%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m