echo questions

H

Henry

Hi all.

I'm trying to recreate a file and changing some of the
contense making use of echo. I ran into a few snags with
which I need help.
1) I'm trying to create a blank line in the file?
2) I'm trying to add this: Text a | text b
the problem I have with point 2 it that I can't have
any "" displayed in the line by making use of "Text a |
text b"

any suggestions?
ps. I would like to stay away from utilities as this will
run on various servers
 
P

Phil Robyn

Henry said:
Hi all.

I'm trying to recreate a file and changing some of the
contense making use of echo. I ran into a few snags with
which I need help.
1) I'm trying to create a blank line in the file?
2) I'm trying to add this: Text a | text b
the problem I have with point 2 it that I can't have
any "" displayed in the line by making use of "Text a |
text b"

any suggestions?
ps. I would like to stay away from utilities as this will
run on various servers

Blank line:

echo/>>c:\yourpath\yourfile.txt

'Text a | text b':

echo/Text a ^| text b>>c:\yourpath\yourfile.txt
 
H

Henry

....and how about just the work off its own line eg.

hello world
off
bye world

.....?
 
W

Wolfgang Kais

Hello Henry.

Henry wrote
Hi all.

I'm trying to recreate a file and changing some of the
contense making use of echo. I ran into a few snags with
which I need help.
1) I'm trying to create a blank line in the file?
echo.>>file.txt

2) I'm trying to add this: Text a | text b
the problem I have with point 2 it that I can't have
any "" displayed in the line by making use of "Text a |
text b"
any suggestions?
ps. I would like to stay away from utilities as this will
run on various servers

for /f %%p in ("|") do echo Text a %%p text b>>file.txt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top