I'm a C newbie and I need some help. So this is the problem I'm having with the terminal. Let's say I'm inputting a text file.
./Terminal < someFile.txt
How do I get my program to only perform a duty when a file has been input, else do another task?
int main() {
//If user input is a file, do something
if()
//do something
else
//do something else
}
Sorry if I'm not formulating my question correctly, beginner programmer here.