Pulling information from a text file using for /f
Posted: 06 Apr 2012 20:03
I need to ultimately end up with two variables in each for /f loop
s%% (first token in each line)
t%% (everything after the first delimiter)
----------- text.txt --------------
S8F1TR4 Westwood CA 8F1
S86cTR4 Crenshaw 026
S8BDTR4 Inglewood CA 971
S8AFTR4 Tri Counties ADO CA H89
S8CATR4 Thousand Oaks CA A09
S887TR4 Boyle Heights CA 904
S86ETR4 Compton 434
-----------------------------------
so, for example:
s%%=S8F1TR4 , t%%=Westwood CA 8F1
s%%=S86cTR4 , t%%=Crenshaw 026
What's the simplest way have t%% = everything after the first space delimiter? Thanks in advance!
s%% (first token in each line)
t%% (everything after the first delimiter)
----------- text.txt --------------
S8F1TR4 Westwood CA 8F1
S86cTR4 Crenshaw 026
S8BDTR4 Inglewood CA 971
S8AFTR4 Tri Counties ADO CA H89
S8CATR4 Thousand Oaks CA A09
S887TR4 Boyle Heights CA 904
S86ETR4 Compton 434
-----------------------------------
so, for example:
s%%=S8F1TR4 , t%%=Westwood CA 8F1
s%%=S86cTR4 , t%%=Crenshaw 026
What's the simplest way have t%% = everything after the first space delimiter? Thanks in advance!