I want to know if it is possible in linux and C to find out that the output of my programs is redirected to a file. I want to format the output that is read by man when it prints to stdout $ ./myprogram, and like csv when it is redirected to a file$ ./myprogram >> data.csv
is it possible?
source
share