468,456 Members | 1,813 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,456 developers. It's quick & easy.

Question about C programming

I have a question. I made a C program that copies a CSV file into another CSV file but with a new column. To run it you have to put this ./programname inputfile outputfile

I need to use the inputfile name in the program, is there a way that the program can save the inputfile name as a string from the command line at theterminal???

Im using the comand:

>foreach $var (`cat list.txt`)
>./programname $var.csv new$var.csv

On the list.txt there are all the file names i want to work on.

Is there a way for it to take the inputfile name as a string without the .csv extension, like just the $var part?
Jul 10 '06 #1
0 2210

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by max | last post: by
12 posts views Thread by pachanga | last post: by
7 posts views Thread by Tony Johansson | last post: by
17 posts views Thread by Materialised | last post: by
1 post views Thread by Katrin Tomanek | last post: by
5 posts views Thread by Rasmus Kromann-Larsen | last post: by
13 posts views Thread by John Salerno | last post: by
13 posts views Thread by Woody Splawn | last post: by
8 posts views Thread by Support | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.