jimmy
When I have a file like

line1-part1line1-part2line1-part3line1-part4line1-part5
line2-part1line2-part2line2-part3line2-part4line2-part5
line3-part1line3-part2line3-part3line3-part4line3-part5
line4-part1line4-part2line4-part3line4-part4line4-part5
line5-part1line5-part2line5-part3line5-part4line5-part5

I want to recreate it with echo in such way I can copy and paste it in shorter lines than

echo line1-part1line1-part2line1-part3line1-part4line1-part5 >>example.txt
echo line2-part1line2-part2line2-part3line2-part4line2-part5 >>example.txt
echo line3-part1line3-part2line3-part3line3-part4line3-part5 >>example.txt
echo line4-part1line4-part2line4-part3line4-part4line4-part5 >>example.txt
echo line5-part1line5-part2line5-part3line5-part4line5-part5 >>example.txt

something like lets say 30 characters and than begin a next line
but in the final txt it should become the original input again.
Is there anyway to do that ? I think not, but you never know.
it must been done without the use of any external programs


additional question:

when I try
echo blabla&tata >>file.txt

than it complains that tata isn't an internal command.

I tryed
echo "blabla&tata" >>file.txt

but than it puts "blabla&tata" in the txt, anyone knows a solution
boshcash
maybe with & command but making lines shorter sometimes floods the cmd shell causing connection to be lost or hanged ..
mrBob
you can make this is 15 mins if you know a programming language...
do you want it like this:

line1-part1line1-part2line1-part3line1
-part4line1-part5
line2-part1line2-part2line2-part3line2
-part4line2-part5

or how?

-mrBob smile.gif
jimmy
first of all I'm still wondering what to do with the & ?

and second, I want to copy and paste shorter things than the whole line
so I want the original back, by copying and pasting shorter lines than the ones mentioned
boshcash
echo text >>file.txt & echo textatline2 >>file.txt , & starts a new cmd at same line ..
BlaStA
echo blabla^&tata >>file.txt
T3cHn0b0y
Maybe you can try using the SET variable command in the shell for shortening a string of reoccurring text like this:

SET A=line1-part1line1-part2line1
SET B=-part3line1-part4line1-part5

then to echo the first line into the file you would type:

echo %A%%B%>>example.txt

24 characters smile.gif

and im sure you can do better than that too cool.gif

The second question:

echo blabla&tata >>file.txt is being treated as if it is two separate commands. Everything before the & sign is treated as one command, and everything after another.

The command prompt can understand "echo blabla" as it will display blabla on your screen, but then it tries to execute tata >>file.txt

Unless you have an executable file called tata.exe/tata.bat/tata.com in the current working directory then the prompt is gonna give you an error message.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.