I want to call ./prog with arguments from args.txt, but meanwhile, ./prog also reads from file input in.txt
I tried cat args.txt | xargs ./prog < in.txt but it doesn't work.
I understand if the program doesn't need input, cat args.txt | xargs ./prog should work.
But in this case, how should I write it..?
Thank you in advance.
./prog $(cat args.txt)won't work if args.txt have special characters. for example, I might want to pass contents: "arg1 arg2" arg3 as 2 arguments, where the 1st argument is "arg1 arg2" as a whole, the 2nd is arg3