By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,412 Members | 978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,412 IT Pros & Developers. It's quick & easy.

Question about C programming

P: 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
Share this question for a faster answer!
Share on Google+

Post your reply

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