views:

33

answers:

2

Hi

In linux, we can do it with tr command to remove space. How can I do it in windows? I like to remove space in each line of a text file from command line in Windows XP. Thanks.

+1  A: 

You'll need a scripting language (Powershell, Python, Perl...) or use tr via Cygwin.

Scott Stafford
+1  A: 

Here's a windows shell script example from http://www.dostips.com/DtTipsStringManipulation.php#Snippets.RemoveSpaces

set str=      word       &rem
echo."%str%"
set str=%str: =%
echo."%str%"
BenV
Joey