Answer the question
In order to leave comments, you need to log in
How to properly escape a string?
Greetings! I've been suffering for the second hour already... How to properly escape the contents of the LINE variable?
set s=1
if %s% == 1 (
set LINE=block_image_update(map_partition("product_a"), package_extract_file("product.transfer.list"), "product.new.dat.br", "product.patch.dat") || abort("E2001: Failed to update product image.");
echo %LINE% >> file
)
Answer the question
In order to leave comments, you need to log in
In general, the question is not so simple.
|
на ^^^|
:set LINE=block_image_update(map_partition("product_a"), package_extract_file("product.transfer.list"), "product.new.dat.br", "product.patch.dat") ^^^|^^^| abort("E2001: Failed to update product image.");
|
для set
и ещё раз экранируются |
и уже ^
для echo
.|
and )
:setlocal enabledelayedexpansion
set s=1
if %s% == 1 (
set LINE=block_image_update(map_partition("product_a"^), package_extract_file("product.transfer.list"^), "product.new.dat.br", "product.patch.dat"^) ^|^| abort("E2001: Failed to update product image."^);
echo !LINE! >> file
)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question