'Add four spaces before each line of code in terminal [Windows]

Is there any faster way to add fours spaces to each line except by manually adding it? How could it be done from a terminal in Windows?

sed 's/^/    /' file

This would work on unix/linux. How could this command be written in Windows?

  • I get this error:

    'sed' is not recognized as an internal or external command, operable program or batch file.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source