Thread View: comp.sys.ibm.pc.programmer
1 messages
1 total messages
Started by Lawrence D. Sher
Sat, 03 Nov 1990 12:41
Passing delimiters to a batch file
Author: Lawrence D. Sher
Date: Sat, 03 Nov 1990 12:41
Date: Sat, 03 Nov 1990 12:41
28 lines
1532 bytes
1532 bytes
I want to be able to call a batch file with arguments that contain
commas. This over-ambitious goal has led me to discover that DOS uses
both spaces and commas (and any contiguous collection thereof) as
delimiters between arguments.
Thus, if test.bat is
echo %1
echo %2
then at the DOS prompt
test 3,4 (or test 3 4 or test 3, 4)
produces
3
4
That means that commas cannot be passed in as part of the arguments
unless they are specially sheltered or "escaped" somehow. What I'd like
to do is have
test "foo(3,4)" 5
echo
foo(3,4)
5
but of course it echoes
"foo(3
4)"
I can't find any way of doing this. Is there any way?
.----------------------------------------------------------------
/Internet email: sher@bbn.com
Larry Sher < US Mail: BBN, MS 6/5A, 10 Moulton St., Cambridge, MA 02138
\ Telephone: (617) 873 3426 FAX: (617) 873 3776
`----------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads