[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

echo tab character

Posted on 2007-11-28
3
Medium Priority
?
9,774 Views
Last Modified: 2010-08-05
hi,

How can i echo a tab character? I want this for creating a tab-delimited logfile

echo Field1 tab Field2 >> logfile.txt

thanks
0
Comment
Question by:xenium
3 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 75 total points
ID: 20368524
I do not believe it is possible to convince DOS echo to echo control characters using escape strings (such as \t); however, there is no reason why you can't just embed a normal tab in your output if this is part of a batch file.

E.g.


echo hello	world

Open in new window

0
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 75 total points
ID: 20368526
You can always do it from Notepad, i.e.

set tab=(hit the tab key)
echo field1%tab%field2%tab%field3  > logfile.txt
0
 

Author Comment

by:xenium
ID: 20369261
thanks, i didn't think of this, which is easy since the batch command is being generated by a program that easily assigns the tab character.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question