Increments from content of a file

3 views
Skip to first unread message

Bart

unread,
Jul 18, 2011, 6:13:03 PM7/18/11
to
I have a file call node.out. The content of node.out may contain
multiple node names which are format by 1 line per column.

For example:

node1
node2
node3

I would like to take the each node names from node.out and set it to a
variable. Each node name will have an incremented variable name.

set VAR1=node1
set VAR2=node2
set VAR3=node3

I won't know how many node names my file node.out may contain so I
guess it needs to increment until the end of the file.

Thanks in Advance!


Richard Bonner

unread,
Jul 22, 2011, 10:46:38 AM7/22/11
to

> For example:

> node1
> node2
> node3

*** This is probably not what you want, but since there have been no
other followups, I thought I'd throw this out there:

If your operation can be done via a DOS batch file, I would use XSET to
place each line into a variable. Also, 4DOS' `@LINE' function or `FOR'
command should also work -- and with fewer lines of code than XSET.

--
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/

Reply all
Reply to author
Forward
0 new messages