Page 1 of 1

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

Posted: Thu May 26, 2022 9:14 am
by answerhappygod
C programming
If in my program I redirect a file using this line of code
below
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 1
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 1 (1.32 KiB) Viewed 9 times
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
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 2
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 2 (1.33 KiB) Viewed 9 times
system("cat text.txt > file1.txt");
system("cat file1.txt file2.txt");