Sponsored Content
Top Forums Shell Programming and Scripting insert one file into middle of another file Post 302173599 by Tytalus on Friday 7th of March 2008 06:41:59 AM
Old 03-07-2008
also - can use cat for legibility:

Code:
#  cat file1 | paste - - | paste file2 - | tr "\t" "\n"

does same as 1st ans..
 

10 More Discussions You Might Find Interesting

1. Programming

how to insert and delete characters in the middle of file

I have a problem that I want to insert and delete some chars in the middle of a file. fopen() and fdopen() just allow to append at the end. Is there any simple method or existing library that allow these actions? Thanks in advance.:confused: (7 Replies)
Discussion started by: ivancheung
7 Replies

2. Shell Programming and Scripting

insert text into the middle of a original file

how do u insert text into a specific place in a file, say the middle for example, without changing the name for that file (1 Reply)
Discussion started by: mopimp
1 Replies

3. Shell Programming and Scripting

How to insert text into first line of the file and middle of the file?

Script 1 Pre-requisites Create a file with x amount of lines in it, the content of your choice. Write a script that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the... (3 Replies)
Discussion started by: ali hussain
3 Replies

4. Shell Programming and Scripting

How to insert the 1st arg into the middle of the file

I wrote a script like #!/bin/bash echo $1 > temp cat $2 >> temp mv temp $2 now I have problem appending the above script(only using bash shell) so that it now inserts the first argument into the middle of the file. I have tried using $(('wc -l < file' / 2 )) but invain so could any one... (4 Replies)
Discussion started by: boris
4 Replies

5. Shell Programming and Scripting

insert text in the middle of a file

I want to insert a text into the middle of a file (3 Replies)
Discussion started by: relle
3 Replies

6. UNIX for Dummies Questions & Answers

How to insert text in the middle of a file

Hey guys, how do we take a line of text as an argument from a user and then insert it in the middle of a file irrespective of the number of lines in the file. I am trying to do this without SED or AWK. Inserting it in the beginning and at the end is easy, but i am trying to accomplish inserting... (6 Replies)
Discussion started by: kartikkumar84@g
6 Replies

7. Shell Programming and Scripting

How do I insert a line in the middle of a file in BASH?

I have tried sed '/6/a text_to_inserted' file > newfile but this inserts test_to_insert at random places in file and i want it in specific location, which is line 6. can anyone help.... (6 Replies)
Discussion started by: phenom
6 Replies

8. Shell Programming and Scripting

How to insert text in the middle of a file?

Hi, So far i've made a script that takes two argument, 1st is the contents and the 2nd is the named file. At the moment i've managed to insert new contents as a new line at the top, but i want to ask how can you insert contents in the middle of the file? Source Code #!/bin/bash #Write... (3 Replies)
Discussion started by: zen10
3 Replies

9. Shell Programming and Scripting

Subsituting contents of entire file to middle of another file using awk

Hi I have a data file 'File2' consisting of 105670 lines. I want to copy and paste 17928 lines from 'File1' to 'File2' but I want to place it in between lines 21 and 17950 of 'File2'. How do I do it in awk? For example- File A has 5 lines X Y 1 2 3 4 5 6 7 8 9 and File B has A b... (1 Reply)
Discussion started by: ananyob
1 Replies

10. Shell Programming and Scripting

Subsituting contents of entire file to middle of another file using awk

Hi I have a data file 'File2' consisting of 105670 lines. I want to copy and paste 17928 lines from 'File1' to 'File2' but I want to place it in between lines 21 and 17950 of 'File2'. How do I do it in awk? For example- File A has 5 lines X Y 1 2 3 4 5 6 7 8 9 and File B has A b... (1 Reply)
Discussion started by: ananyob
1 Replies
TMX2TMX(1p)						User Contributed Perl Documentation					       TMX2TMX(1p)

NAME
tmx2tmx - utility to convert and filter TMX files SYNOPSYS
tmx2tmx -cat file1.tmx ... filen.tmx > file.tmx tmx2tmx -toTrados file1.tmx > file2.tmx tmx2tmx -clean file1.tmx > file2.tmx tmx2tmx -select=PT,EN multilingual.tmx > pt-en.tmx DESCRIPTION
This utility processes TMX documents and return TMX documents. Tasks done with this utility include conversion between TMX versions and TMX cleaning. TRADOS conversion As you maybe know, TRADOS is a company producing computer software for translators. It includes WorkBench which imports TMX files. Unfortunately, the version I used do not import TMX version 1.4. This process is done using the switch "-toTrados": tmx2tmx -toTrados file.tmx > trados.tmx TMX Cleaning Specially when translation memories are created from anotated text, or extracted directly from the Internet using any automatic method. This switch is used to remove junk in translation units. This option tries to remove junk from TMX files, like empty pairs where one of the sides is empty, or removing other junk type. Use it this way: tmx2tmx -clean file.tmx > file2.tmx Concatenating TMX tmx2tmx -cat file1.tmx ... filen.tmx > file.tmx ls | grep '.tmx$' | tmx2tmx -cat > file.tmx Select languages Select a bunch of languages: tmx2tmx -select=PT,EN,FR huge.tmx > pt-en-fr.tmx SEE ALSO
tmx2html, po2tmx, XML::TMX AUTHOR
Alberto Simo~es, <albie@alfarrabio.di.uminho.pt> COPYRIGHT AND LICENSE
Copyright 2004 by Projecto Natura This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-05 TMX2TMX(1p)
All times are GMT -4. The time now is 08:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy