script to convert texts
Hello Linux friends, this is a little difficult to describe, but I have to following situation: We run a HOST here, which sends out weekly. These sendings shall now contain the same text in a different way: NOW: We send one text with the first part german text and after that the same stuff in english. WHAT I WANT is break both the german and the english text to let both appear beside each other, meaning that then the german is on the left and the english is on the right. Therefore I need a script, because it is half a MB of texts. I do not yet know what tool to take, but it should look like: ....35 chars german text... I (one separator line, ascii) ...35 chars english... and this is taken from one german file and one english file. I sincerely hope you have understood what I have been trying to explain :-) Hope you have some solutions or at least ideas on this. Kindest regards! o.b. -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - soon back online +49.4503.TRSi1/TRSi2 <<<
On Thursday 13 September 2001 3:39 pm, Oliver Ob wrote:
Hello Linux friends, this is a little difficult to describe, but I have to following situation: We run a HOST here, which sends out weekly. These sendings shall now contain the same text in a different way:
NOW: We send one text with the first part german text and after that the same stuff in english.
WHAT I WANT is break both the german and the english text to let both appear beside each other, meaning that then the german is on the left and the english is on the right.
Therefore I need a script, because it is half a MB of texts.
I do not yet know what tool to take, but it should look like: ....35 chars german text... I (one separator line, ascii) ...35 chars english... and this is taken from one german file and one english file.
I sincerely hope you have understood what I have been trying to explain
Not really. ;-) What format are you distributing the text: XML, HTML, e-mail? Do you have a sample file (or part of)? M P.S. What's this doing in your message header: undisclosed-recipients:; ?
Martin Webster schrieb:
On Thursday 13 September 2001 3:39 pm, Oliver Ob wrote:
Hello Linux friends, this is a little difficult to describe, but I have to following situation: We run a HOST here, which sends out weekly. These sendings shall now contain the same text in a different way:
NOW: We send one text with the first part german text and after that the same stuff in english.
WHAT I WANT is break both the german and the english text to let both appear beside each other, meaning that then the german is on the left and the english is on the right.
Therefore I need a script, because it is half a MB of texts.
I do not yet know what tool to take, but it should look like: ....35 chars german text... I (one separator line, ascii) ...35 chars english... and this is taken from one german file and one english file.
I sincerely hope you have understood what I have been trying to explain
Not really. ;-)
What format are you distributing the text: XML, HTML, e-mail? Do you have a sample file (or part of)?
It is two simple text files (didn't I mention?) which shall be broken in line length and be put aside of each other. like above:
....35 chars german text... I (one separator line, ascii) ...35 chars
Isn't there a tool? -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - soon back online +49.4503.TRSi1/TRSi2 <<<
On Friday 14 September 2001 1:52 pm, Oliver Ob wrote:
Martin Webster schrieb:
On Thursday 13 September 2001 3:39 pm, Oliver Ob wrote:
Hello Linux friends, this is a little difficult to describe, but I have to following situation: We run a HOST here, which sends out weekly. These sendings shall now contain the same text in a different way:
NOW: We send one text with the first part german text and after that the same stuff in english.
WHAT I WANT is break both the german and the english text to let both appear beside each other, meaning that then the german is on the left and the english is on the right.
Therefore I need a script, because it is half a MB of texts.
I do not yet know what tool to take, but it should look like: ....35 chars german text... I (one separator line, ascii) ...35 chars english... and this is taken from one german file and one english file.
I sincerely hope you have understood what I have been trying to explain
Not really. ;-)
What format are you distributing the text: XML, HTML, e-mail? Do you have a sample file (or part of)?
It is two simple text files (didn't I mention?) which shall be broken in line length and be put aside of each other.
like above:
....35 chars german text... I (one separator line, ascii) ...35 chars
Isn't there a tool?
You could use Perl and CPAN Text::Wrap to create files of the desired width. Then read each line from each file using the following: @text = split(/\n/, $doc); foreach $line (@text) { ... } You can then join the text (you'd need to add whitespace for formatting) and output to a new file. M
Martin Webster schrieb:
On Friday 14 September 2001 1:52 pm, Oliver Ob wrote:
Martin Webster schrieb:
On Thursday 13 September 2001 3:39 pm, Oliver Ob wrote:
Hello Linux friends, this is a little difficult to describe, but I have to following situation: We run a HOST here, which sends out weekly. These sendings shall now contain the same text in a different way:
NOW: We send one text with the first part german text and after that the same stuff in english.
WHAT I WANT is break both the german and the english text to let both appear beside each other, meaning that then the german is on the left and the english is on the right.
Therefore I need a script, because it is half a MB of texts.
I do not yet know what tool to take, but it should look like: ....35 chars german text... I (one separator line, ascii) ...35 chars english... and this is taken from one german file and one english file.
I sincerely hope you have understood what I have been trying to explain
Not really. ;-)
What format are you distributing the text: XML, HTML, e-mail? Do you have a sample file (or part of)?
It is two simple text files (didn't I mention?) which shall be broken in line length and be put aside of each other.
like above:
....35 chars german text... I (one separator line, ascii) ...35 chars
Isn't there a tool?
You could use Perl and CPAN Text::Wrap to create files of the desired width. Then read each line from each file using the following:
@text = split(/\n/, $doc); foreach $line (@text) { ... }
You can then join the text (you'd need to add whitespace for formatting) and output to a new file.
M
Sort of. Only that I am too new to bash to programm that on my own. -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - soon back online +49.4503.TRSi1/TRSi2 <<<
....37 chars german text... I (one separator line, ascii) ...37 chars
It is two simple text files (didn't I mention?) which shall be broken in line length and be put aside of each other. like above: ...correction 37 instead of 35 that is= 37 + 1 space + 1 separator sign + 1 space + 37= total 79 chars. Isn't there a tool? -- *º¤., ¸¸,.¤º*¨¨¨*¤ =Oliver@home= *º¤., ¸¸,.¤º*¨¨*¤ I http://www.bmw-roadster.de/Friends/Olli/olli.html I I http://www.bmw-roadster.de/Friends/friends.html I I http://groups.yahoo.com/group/VGAP-93 I I http://home.t-online.de/home/spacecraft.portal I
Telek0ma iBBMS - soon back online +49.4503.TRSi1/TRSi2 <<<
On Mon, 17 Sep 2001, Oliver Ob wrote:
It is two simple text files (didn't I mention?) which shall be broken in line length and be put aside of each other. like above: ...correction 37 instead of 35
....37 chars german text... I (one separator line, ascii) ...37 chars that is= 37 + 1 space + 1 separator sign + 1 space + 37= total 79 chars.
Isn't there a tool?
Take a look at man paste... I think it does EXACTLY what you want. Regards Ole
participants (3)
-
Martin Webster
-
Ole Kofoed Hansen
-
Oliver Ob