468,456 Members | 1,804 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

6
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
>end

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 874

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Mohammed Mazid | last post: by
3 posts views Thread by Stevey | last post: by
10 posts views Thread by glenn | last post: by
53 posts views Thread by Jeff | last post: by
56 posts views Thread by spibou | last post: by
2 posts views Thread by Allan Ebdrup | last post: by
3 posts views Thread by Zhang Weiwu | last post: by
1 post views Thread by subhajit12345 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.