Ubuntu :: Combine Columns In Text Files?

Feb 15, 2010

I have two files which I would like to combine. Each file has 2 columns.

File 1:
1 a
2 b

[code]...

View 2 Replies


ADVERTISEMENT

General :: How To Combine Multiple Text Files

Mar 22, 2011

Combine multiple text files into one text file?

View 5 Replies View Related

Software :: Combine And Partially Overwrite Text Files?

May 18, 2010

I need to overwrite the first say 50 or so lines of an xml file on an everyday basis. The first 50 lines of the file are always the same and the 50 lines they get replaced with are always the same. Is there a way to create a file with the 50 new lines and somehow copy/merge/overwrite the larger file such that the 50 original lines would be replaced but the remainder of the file would be untouched?This seems simple, there has to be a way to do it. I'm just not smart enough to figure it out.

View 2 Replies View Related

General :: Match And Combine 2 Text Files Line By Line

Mar 21, 2011

This solution works but is slow with large files. I am looking for a faster solution.

The 2 files contain filenames, one of them has associated data I want to append to the other file's matching filenames

file1:

file2:

I append file2 by matching the unique_filenames and appending them with the tag data and some formatting

appended file2:


Here is the SLOW code

while read inputline.

View 9 Replies View Related

Ubuntu :: Combine MP3 Files Into A Single File?

Feb 28, 2010

I have an audiobook in 64 small mp3 files and I need them combined into a single file of any format in the proper order or order that I add them in. What program can I use?

View 9 Replies View Related

Ubuntu Multimedia :: Join(combine) Two .ogv Files Into One?

Nov 27, 2010

How to use ffmpeg or memcoder to join two .ogv files into a single .ogv ??Let's suppose the first .ogv video file is named as "01.ogv" and the resolution is 800*600;the second .ogv video file is named as "02.ogv" and the resolution is 720*576.I'd love to join two video files into a whole one, with the resolution 320*240.

View 1 Replies View Related

Software :: Join 2 Text Files Based On First Number Present In Every Line Of The 2 Text Files?

Jan 22, 2010

I have 2 text files : file1.txt and file2.txt

cat file1.txt

15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces

cat file2.txt

2 this is sentence1file2
6 this is sentence2file2
54 this is sentence3file2

I would like to join these 2 files. The result should look as follows :

cat joinedfile.txt

2 this is sentence1file2
6 this is sentence2file2
15 this is a sentence containing various words and spaces
34 this is a another sentence containing various words and spaces
54 this is sentence3file2

==> so the joined file must be sorted on the first number. Any ideas how this can be achieved ?

View 4 Replies View Related

General :: Merging Columns From Different Files?

Oct 10, 2010

I have three files with the following structure:

file1
1 2 3 4
5 6 7 8

[code]...

View 4 Replies View Related

Programming :: Condense And Combine Two Log Files?

Jun 8, 2011

My backup script generates 2 lengthy log file. They have the same name, but the date is appended. I want to select the oldest one, condense it with "head" and "tail" and then append the condensed version of the newer one. They seem to get tangled up.Code:

ls `find . -iname "bak-log_*"` -1t | tail -1
and
ls `find . -iname "bak-log_*"` -rt | tail -1

[code]...

View 2 Replies View Related

General :: Combine Two Files Column-wise In Ubuntu?

Jul 7, 2011

I have two files: one is like

preface
Introduction
chapter 1
the other is like
1
2
3

I was wondering how to column-wise combine the two files into one:

preface 1
Introduction 2
chapter 1 3

by using some utilities, such as awk, sed, available in Ubuntu?

View 1 Replies View Related

General :: Extracting Columns From Multiple Files With Awk?

Sep 22, 2010

I'd like to extract a single column from 5 different files and put them gether in an output file. I saw a similar question for 2 input files, and the line of code workd very well, the code is:awk 'NR==FNR{a[NR]=$2; next} {print a[FNR], $2}' file1 file2I added the file3, file4 and file5 at the end, but it doesn't work. Does anyone know what do I have to do?

View 5 Replies View Related

General :: Merge Columns From Multiple Files?

Dec 20, 2010

I want to merge columns (selectively) from several files and create a new file with the merge output. I saw some suggestions to use pr/paste to join the columns and then awk to pick-up the columns.

Code:
pr -m -t -s file1 file2 | gawk '{print $4,$5,$6,$1}'
But I have hundreds of files and I cannot manually pick up columns using awk as given in

[code]....

View 14 Replies View Related

Programming :: AWK (or TCL/TK): Matching Rows And Columns Between Multiple Files?

May 26, 2011

I've been hitting my head against a wall for awhile with this one:As the last part of some data analysis I performing I would to construct a matrix from a series of different files. These files have the format:

file 1 file 2 file 3
AAAAA .1 AAAAA .1 BBBBB .1
BBBBB .2 BBBBB .1 CCCCC .9

[code]...

View 6 Replies View Related

General :: Combine / Merge Left And Right Video Files?

Jan 11, 2011

How can I join the two parts of a stereoscopic movie to get a side-by-side one?

I can expand the left file, that way all I'll need is to paste the second one on top of it, with something like this:

mencoder left-file.mkv -o side-by-side.avi -oac copy -ovc lavc -of avi -vf scale=1280:720,expand=-1280:0:0:0 -sws 3 -lavcopts vbitrate=16000

Any idea which tool should I use on a Linux system?

View 1 Replies View Related

General :: Shell - Shellscript Combine All Files Without For Loop?

Jun 12, 2011

I have hundreds of files in one directory, is there a simple command or pipes of command I can use to append them together? I don't want to use any loops.

View 4 Replies View Related

Programming :: Bash Script - Merge Files Comparing Columns

Apr 13, 2011

I have 2 very long files which are quite similar:

file1.csv:

Code:

file2.csv:

Code:

I need this output:


Code:

explanation:

If the fields 3 (serie) and 4 (modello) are identical, the lines of the 2 files should be "added":

Code:

If the fields 3 (serie) and 4 (modello) are different, just print the line of both files:

Code:

Is there a way to do this without reading the (huge) files with a "while read line" loop?

View 14 Replies View Related

Fedora :: Bash Script - Combine Files So That The File Output Is PORT.80 TCP SRC=x.x.x.x United States

Oct 31, 2010

I am working on a script that allows me to convert an IP address to a country name. I have 2 files. One that has text like: PORT.80 TCP SRC=x.x.x.x and the other is x.x.x.x United States. How can I combine these files so that the file output is PORT.80 TCP SRC=x.x.x.x United States?

View 5 Replies View Related

Software :: Use Sed To Include A Text File In The Beginning Of Other Text Files Inside A Folder And Its Subfolders?

Jun 1, 2010

Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.

View 4 Replies View Related

CentOS 5 :: Text User Interface To Configure Text Files

Nov 5, 2009

I would like to write a text user interface (TUI) to adjust some text config files etc. Is there a tool or application for creating TUIs like this. I�m talking about those types of config tools which you see executed at first boot.

View 19 Replies View Related

General :: Loop Append Text To Text Files?

Jan 15, 2010

may be an advanced question but I need to know how to do this. Here at work I am in charge of recruiting and we have about 1,000 resumes in already. All of the resumes are in a .pdf format. I need to rename every .pdf in the following format:{firstnameLastname}.pdfThe only way I know how to do this is to convert all the .pdf files to text, extract the name out of the first few lines of text, import into excel, and then use VBA to rename the files in mass:Here is my logic so far:~Deskop/a = houses all the .pdfresumesOpen terminal: Code: cd ~/Desktop/afor f in *.pdf; do pdftotext -raw $f; done That will convert all of the preceding resumes into text filesNow I would like to append the name of the text file into the last line of the text file. So, for example, for Resume1.txt, I want to append "Resume1.txt" to the last line within Resume1.txt. So after I run the command I open Resume1.txt and on the last line within I want to see "Resume1.txt" on the last line, at the end of the resume.How can I do this? I would like to use a loop and have the terminal append the filename to the body of the text file until all of the have been appended.

View 1 Replies View Related

General :: Search Text In All Text Files Of All The Sub-directories?

Apr 21, 2010

Currently, when I'm searching text in files of my PHP project, I use this line :

Code:

grep -r 'myTextToFind' *

But now, I would like to search only in ".lang" files. How can I do that ?

View 7 Replies View Related

Programming :: Finding A Utility To Combine Two Or More Binary Files Into A Single Binary File?

May 5, 2011

Is there any Linux utility to combine two or more binary files into a single binary file ?

View 7 Replies View Related

Programming :: Command For Find/Replace In Text Files (inc. Files In Sub-folders)?

Oct 11, 2010

I found this command that works great finding and replacing a simple string to another in files located in that folder and all sub-folders.

Code: find . -name '*.php' | xargs perl -pi -e 's/OldText/NewText/g'

The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.

View 1 Replies View Related

Software :: Differentiate Two Large Text Files Using Shell Script / Files Are Like Below?

Jan 20, 2009

I want to automate this using script.How to automate it?

File1:
s.no# 1 name:aaaaaa
city:abcd

[code]...

View 1 Replies View Related

Fedora :: Compression Ratio For Text Files / Binary Files

Apr 15, 2011

Fedora provides several compression techniques. E.g tar, tar.gz, zip etc. I want to know which among them provides

1. the best compression ratio for text files

2. the best compression ratio for binary files

3. fastest compression

View 6 Replies View Related

General :: Convert Open Office (odt) Files To Text Files?

May 25, 2011

How do you convert Open Office (ODT) documents to Text files?
I have made a report using libre office. Now I wish to continue editing the document using lyx (latex front end). So the ODT file needs to be saved as some .tex file.

I don't see an option to do this in File menu (export/save as). So is there any other plugin to do this?

View 1 Replies View Related

Ubuntu :: Compare Two Pdf Files For Text Differences?

Mar 10, 2010

How can I compare two pdf files for text differences

View 3 Replies View Related

Ubuntu :: Read Text Files In Windows?

May 25, 2010

A real os should at least e able to read and write plain text, you think? But no, when I try to open my text files (mainly made with gedit) some characters are ass, swedish letters rarely work and ', ", / and so on are not represented as the characters I want to see. Is there a easy, fast way to read (and print!) my text files at school, where they have only windows, without spending half an hour fixing the file by hand?

View 6 Replies View Related

Ubuntu :: View 11.000 Text Files Quickly?

Oct 13, 2010

I need to view 10.858 text files by this friday to see which ones I need (searching file contents is not a solution), I was wondering if anyone knew any way/program to quickly view them as if they were, for example, images? And, optionally, to be able to save them to a different location from there? It doesn't necessarily have to be for Ubuntu as I also have WinXP and Vista, but it would save me having to transfer those couple of gigabytes to another computer.

View 3 Replies View Related

Ubuntu :: Opening Executable As Text Files?

Oct 29, 2010

So I have Python file :

Code:
#!/usr/bin/env python
print 'python'
raw_input('')
And another :

[Code]....

as it should. I don't want to take such a hassle always running python by path.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved