View Single Post
  #1 (permalink)  
Old February 8th, 2008, 08:53 PM
manih manih is offline
Authorized User
 
Join Date: Jun 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Reply With Quote