Question about C

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jomatg
    New Member
    • Jul 2006
    • 6

    Question about C

    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?
    Last edited by jomatg; Jul 10 '06, 06:25 PM.
Working...