Hi,

I'm trying to create a program that will grab the contents of the clipboard (youtube video link), and download the video. DONE.

Problem encounter is that I need to know if a video was successfully downloaded or if it needs further attention. My thought was to have my program open up an xterm window and execute the command. This way if an error has occurred, the window will display the error. And if I do a bunch of videos, successfully, I end up with a bunch of windows that I need to close. I would like it to close the window if the downloading was successful, and leave the window if there's something that needs more attention.

To do this, I feel, I need a logical AND in my `execl()` call. But all forms that I have tried don't work. I am not sure where to put the logical AND, or if it can be used at all.

Can someone offer some insight into this, please?

I've tried:
Code:
execl("/usr/bin/xterm", "xterm && exit", "-name", "Downloader", "-e", "yt-dlp", url, (char *) NULL);
execl("/usr/bin/xterm", "xterm", "-name", "Downloader", "-e", "yt-dlp && exit", url, (char *) NULL);
execl("/usr/bin/xterm", "xterm", "-name", "Downloader", "-e", "yt-dlp", url, "&&", "exit", (char *) NULL);
execl("/usr/bin/xterm", "xterm", "-name", "Downloader", "-e", "yt-dlp", url, "&& exit", (char *) NULL);