1

This doesn't work, for example:

set var=<text.txt

It can be done like this in BASH:

#!/bin/bash
variable=$(cat text.txt)
echo $variable
3
  • why do you need to use DOS? It has very limited capability even compared to cmd.exe. No for loop at all, for example
    – phuclv
    Commented Aug 6, 2017 at 15:50
  • set /P var=<text.txt in cmd although I don't know whether /P is valid switch in MS-DOS.
    – JosefZ
    Commented Aug 6, 2017 at 19:01
  • It doesn't work @JosefZ
    – cronulis
    Commented Aug 7, 2017 at 5:33

0

You must log in to answer this question.

Browse other questions tagged .