LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Delimiters in control file (http://www.linuxquestions.org/questions/programming-9/delimiters-in-control-file-472743/)

ancys 08-10-2006 05:27 PM

Delimiters in control file
 
hi all,

Is it possible to have different delimiter in control file(i.e for same test file first i can have # rlater ican change to . in the file )as delimiter

instead of hardcoding evry time is it possible to store delimiter config variable n replace it in control file

All ready the pathname/filename in control file is got thru a config var

help

xhi 08-11-2006 11:40 AM

this may or may not be what you are talking about, since you provided no code, specified no language and did not describe this 'control file'. but ill still say that in theory this should be easy to do..

Code:

#
thisisafield#thisisanother#andanother
thisisafield#thisisanother#andanother
thisisafield#thisisanother#andanother
...

or
Code:

.
thisisafield.andanother.andanother
thisisafield.andanother.andanother
thisisafield.andanother.andanother
...

just read the first char of the file in and say that is the delimiter, from there on out pass that char to the record reading functions to use a a delimiter


All times are GMT -5. The time now is 10:57 AM.