C programming
If in my program I redirect a file using this line of code
below
How can I get the filename and contents of the output file from
stdin or stdout? I need to perform the line of code above and
once its redirected and outputted to file1, I need the file
contents and name to perform the same system command, but instead
it will now be as shown below; Instead of redirecting to file1 it
will redirect file1 to file2
system("cat text.txt > file1.txt");
system("cat file1.txt file2.txt");
C programming If in my program I redirect a file using this line of code below How can I get the filename and contents o
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am