I want to know if it is posible in linux and C to find out that my programs output is redirected to a file.
I want to format the output human readable when it is printed on stdout $ ./myprogram
and like csv when it is redirected to a file $ ./myprogram >> data.csv
is it posible?