Guest net_admin Posted February 5, 2008 Posted February 5, 2008 Hi all, When I perform the cmd below, a text file is created with the following text "number=1 ". Note that there's an space after the text, but I don't want that. echo number=1 > file.txt Does anyone know to make echo not adding that space or knows another cmd which could create that file with this specific text? Regards, -- NetAdmin <São Paulo, BR>
Guest Pegasus \(MVP\) Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line "net_admin" <netadmin@discussions.microsoft.com> wrote in message news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... > Hi all, > > When I perform the cmd below, a text file is created with the following > text > "number=1 ". Note that there's an space after the text, but I don't want > that. > > echo number=1 > file.txt > > Does anyone know to make echo not adding that space or knows another cmd > which could create that file with this specific text? > > > Regards, > -- > NetAdmin <São Paulo, BR> > Try this: echo>file.txt number=1
Guest net_admin Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line Thanks for that Pegasus, but it still added a space in the end of the line. I just realized that it considers 2 digits only, so if you put 01 or zero any other number, it will add no space, like: ECHO NUMBER=01 > FILE.TXT -- NetAdmin <São Paulo, BR> "Pegasus (MVP)" wrote: > > "net_admin" <netadmin@discussions.microsoft.com> wrote in message > news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... > > Hi all, > > > > When I perform the cmd below, a text file is created with the following > > text > > "number=1 ". Note that there's an space after the text, but I don't want > > that. > > > > echo number=1 > file.txt > > > > Does anyone know to make echo not adding that space or knows another cmd > > which could create that file with this specific text? > > > > > > Regards, > > -- > > NetAdmin <São Paulo, BR> > > > > Try this: > echo>file.txt number=1 > > >
Guest Pegasus \(MVP\) Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line If you run the command exactly the way I wrote it, it will NOT add a space to the end of the line. Here is the binary result: 137F:0100 6E 75 6D 62 65 72 3D 31-0D 0A 0D 09 2F 34 09 09 number=1 "net_admin" <netadmin@discussions.microsoft.com> wrote in message news:54E65DE6-5127-4600-B748-3B1A5309A522@microsoft.com... > Thanks for that Pegasus, but it still added a space in the end of the > line. > > I just realized that it considers 2 digits only, so if you put 01 or zero > any other number, it will add no space, like: ECHO NUMBER=01 > FILE.TXT > > -- > NetAdmin <São Paulo, BR> > > "Pegasus (MVP)" wrote: > >> >> "net_admin" <netadmin@discussions.microsoft.com> wrote in message >> news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... >> > Hi all, >> > >> > When I perform the cmd below, a text file is created with the following >> > text >> > "number=1 ". Note that there's an space after the text, but I don't >> > want >> > that. >> > >> > echo number=1 > file.txt >> > >> > Does anyone know to make echo not adding that space or knows another >> > cmd >> > which could create that file with this specific text? >> > >> > >> > Regards, >> > -- >> > NetAdmin <São Paulo, BR> >> > >> >> Try this: >> echo>file.txt number=1 >> >> >>
Guest net_admin Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line I copied and pasted your cmd into a cmd line. -- NetAdmin <São Paulo, BR> "Pegasus (MVP)" wrote: > If you run the command exactly the way I wrote it, it will > NOT add a space to the end of the line. Here is the binary > result: > 137F:0100 6E 75 6D 62 65 72 3D 31-0D 0A 0D 09 2F 34 09 09 number=1 > > "net_admin" <netadmin@discussions.microsoft.com> wrote in message > news:54E65DE6-5127-4600-B748-3B1A5309A522@microsoft.com... > > Thanks for that Pegasus, but it still added a space in the end of the > > line. > > > > I just realized that it considers 2 digits only, so if you put 01 or zero > > any other number, it will add no space, like: ECHO NUMBER=01 > FILE.TXT > > > > -- > > NetAdmin <São Paulo, BR> > > > > "Pegasus (MVP)" wrote: > > > >> > >> "net_admin" <netadmin@discussions.microsoft.com> wrote in message > >> news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... > >> > Hi all, > >> > > >> > When I perform the cmd below, a text file is created with the following > >> > text > >> > "number=1 ". Note that there's an space after the text, but I don't > >> > want > >> > that. > >> > > >> > echo number=1 > file.txt > >> > > >> > Does anyone know to make echo not adding that space or knows another > >> > cmd > >> > which could create that file with this specific text? > >> > > >> > > >> > Regards, > >> > -- > >> > NetAdmin <São Paulo, BR> > >> > > >> > >> Try this: > >> echo>file.txt number=1 > >> > >> > >> > > >
Guest Pegasus \(MVP\) Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line Great. Now do it again, then execute these commands and copy & paste the first few screen lines into your reply: echo>file.txt number=1{Enter} debug file.txt{Enter} D{Enter} Q{Enter} "net_admin" <netadmin@discussions.microsoft.com> wrote in message news:53F605BB-1359-47AA-B2F0-B1E5BAE0A670@microsoft.com... >I copied and pasted your cmd into a cmd line. > > -- > NetAdmin <São Paulo, BR> > > > > "Pegasus (MVP)" wrote: > >> If you run the command exactly the way I wrote it, it will >> NOT add a space to the end of the line. Here is the binary >> result: >> 137F:0100 6E 75 6D 62 65 72 3D 31-0D 0A 0D 09 2F 34 09 09 number=1 >> >> "net_admin" <netadmin@discussions.microsoft.com> wrote in message >> news:54E65DE6-5127-4600-B748-3B1A5309A522@microsoft.com... >> > Thanks for that Pegasus, but it still added a space in the end of the >> > line. >> > >> > I just realized that it considers 2 digits only, so if you put 01 or >> > zero >> > any other number, it will add no space, like: ECHO NUMBER=01 > FILE.TXT >> > >> > -- >> > NetAdmin <São Paulo, BR> >> > >> > "Pegasus (MVP)" wrote: >> > >> >> >> >> "net_admin" <netadmin@discussions.microsoft.com> wrote in message >> >> news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... >> >> > Hi all, >> >> > >> >> > When I perform the cmd below, a text file is created with the >> >> > following >> >> > text >> >> > "number=1 ". Note that there's an space after the text, but I don't >> >> > want >> >> > that. >> >> > >> >> > echo number=1 > file.txt >> >> > >> >> > Does anyone know to make echo not adding that space or knows another >> >> > cmd >> >> > which could create that file with this specific text? >> >> > >> >> > >> >> > Regards, >> >> > -- >> >> > NetAdmin <São Paulo, BR> >> >> > >> >> >> >> Try this: >> >> echo>file.txt number=1 >> >> >> >> >> >> >> >> >>
Guest net_admin Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line You don't need to take bad just because I said it didn't work. Relax. I do look stupid now. I did copy your cmd line when you first posted it and it did add the space in the end of the line. I tried again and it worked fine. Good to know, I can now with your suggestion and also with the other way I found out. Merci. -- NetAdmin <São Paulo, BR> "Pegasus (MVP)" wrote: > > "net_admin" <netadmin@discussions.microsoft.com> wrote in message > news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... > > Hi all, > > > > When I perform the cmd below, a text file is created with the following > > text > > "number=1 ". Note that there's an space after the text, but I don't want > > that. > > > > echo number=1 > file.txt > > > > Does anyone know to make echo not adding that space or knows another cmd > > which could create that file with this specific text? > > > > > > Regards, > > -- > > NetAdmin <São Paulo, BR> > > > > Try this: > echo>file.txt number=1 > > >
Guest Pegasus \(MVP\) Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line I did not mind in the least when you claimed that my command did not work. Since it worked for me, I knew that there was a problem with the way you ran it. That's why I gave you the tools to nail it down. You might find that my method is a general method, one that works in just about all problem situations. "net_admin" <netadmin@discussions.microsoft.com> wrote in message news:D4AA4DFF-BF27-4869-B4AF-D3C61684BD57@microsoft.com... > You don't need to take bad just because I said it didn't work. Relax. > > I do look stupid now. I did copy your cmd line when you first posted it > and > it did add the space in the end of the line. > > I tried again and it worked fine. > > Good to know, I can now with your suggestion and also with the other way I > found out. > > > Merci. > > -- > NetAdmin <São Paulo, BR> > > > "Pegasus (MVP)" wrote: > >> >> "net_admin" <netadmin@discussions.microsoft.com> wrote in message >> news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... >> > Hi all, >> > >> > When I perform the cmd below, a text file is created with the following >> > text >> > "number=1 ". Note that there's an space after the text, but I don't >> > want >> > that. >> > >> > echo number=1 > file.txt >> > >> > Does anyone know to make echo not adding that space or knows another >> > cmd >> > which could create that file with this specific text? >> > >> > >> > Regards, >> > -- >> > NetAdmin <São Paulo, BR> >> > >> >> Try this: >> echo>file.txt number=1 >> >> >>
Guest net_admin Posted February 5, 2008 Posted February 5, 2008 Re: Echo adds space in the end of the dumped line Once again, thanks a lot. -- NetAdmin <São Paulo, BR> "Pegasus (MVP)" wrote: > I did not mind in the least when you claimed that my command > did not work. Since it worked for me, I knew that there was > a problem with the way you ran it. That's why I gave you the > tools to nail it down. > > You might find that my method is a general method, one that > works in just about all problem situations. > > > "net_admin" <netadmin@discussions.microsoft.com> wrote in message > news:D4AA4DFF-BF27-4869-B4AF-D3C61684BD57@microsoft.com... > > You don't need to take bad just because I said it didn't work. Relax. > > > > I do look stupid now. I did copy your cmd line when you first posted it > > and > > it did add the space in the end of the line. > > > > I tried again and it worked fine. > > > > Good to know, I can now with your suggestion and also with the other way I > > found out. > > > > > > Merci. > > > > -- > > NetAdmin <São Paulo, BR> > > > > > > "Pegasus (MVP)" wrote: > > > >> > >> "net_admin" <netadmin@discussions.microsoft.com> wrote in message > >> news:E13078ED-4669-4C1B-A277-EEAF5882AF08@microsoft.com... > >> > Hi all, > >> > > >> > When I perform the cmd below, a text file is created with the following > >> > text > >> > "number=1 ". Note that there's an space after the text, but I don't > >> > want > >> > that. > >> > > >> > echo number=1 > file.txt > >> > > >> > Does anyone know to make echo not adding that space or knows another > >> > cmd > >> > which could create that file with this specific text? > >> > > >> > > >> > Regards, > >> > -- > >> > NetAdmin <São Paulo, BR> > >> > > >> > >> Try this: > >> echo>file.txt number=1 > >> > >> > >> > > >
Recommended Posts