C Programming - Sent file using <
Dear programmers, Hi
I'm trying to write program called lineNumber.c, what it dose, it reads a file and put line number it front of it followed by '\t' TAB
for example my exe file name is ln and i try to read a file called sample.c,
one way is, using the command line arguments:
ln -i sample.c
second way is:
ln < sample.c which in this case i think the system opens that file automatically, and all i have to do is to read it.
Now my problem is, if the user want to use the second method, i want to know the input file name (In our case sample.c). How should i do that?
Thanks
Best Regards
Mani
|