12-18-2012
Solution
Read line from file1 then read line from file2Strcat the two to one line and output to file3
Rinse and repeat until eof
-Chris
This User Gave Thanks to Axiomfinity For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Inquiring minds want to know.... I need to take two files that I have latitude and longitude values and then combine them into one file with the values side by side separated by a space.
the first file is temp113-lat.txt and the second is temp113-lon.txt. They each have values listed in the... (15 Replies)
Discussion started by: ahinkebein
15 Replies
2. Shell Programming and Scripting
Hi Everyone,
I need a shell/perl script to bring selected columns from all the files located in a directory and place them in a new file side by side.
File1:
a b c d
2 3 4 5
f g h i
..........
File2:
I II III IV
w x y z
..............
and so on many files are there...... (8 Replies)
Discussion started by: ks_reddy
8 Replies
3. Shell Programming and Scripting
I have 2 text files, both have one simple, single column. The 2 files might be the same length, or might not, and if not, it's unknown which one would be longer.
For this example, file1 is longer:
---file1
Joe
Bob
Mary
Sally
Fred
Elmer
David
---file2
Tomato
House
Car... (3 Replies)
Discussion started by: cajunfries
3 Replies
4. Web Development
I have installed WAMPSERVER 2.0 on my windows vista x64 system but still am having issues with getting the webserver to be seen outside my local network. It is working fine within my local network.
Been through several setup tutorials so far, no dice still.
For testing purposes I have... (1 Reply)
Discussion started by: davidmanvell
1 Replies
5. Shell Programming and Scripting
Input file_1:
P78811
P40108
O17861
Q6NTW1
P40986
Q6PBK1
P38264
Q6PBK1
Q9CZ49
Q1GZI0
Input file_2: (6 Replies)
Discussion started by: patrick87
6 Replies
6. Shell Programming and Scripting
Hi I'm trying to compare 3 or more files based on similar values and outputting them into 3 columns.
For example:
file1
ABC
DEF
GHI
file2
DEF
DER
file3
ABC
DER
The output should come out like this
file1 file2 file3
ABC ABC (4 Replies)
Discussion started by: zerofire123
4 Replies
7. Shell Programming and Scripting
I have about 100s of files of type text in a known directory. I want to merge all files side by side. Number of lines in all the files will remain same.
For example file1 contains
cat
dog
File 2 contains
rat
mat
Output file should be
cat rat
dog mat
Using awk I was able to... (5 Replies)
Discussion started by: kanthrajgowda
5 Replies
8. Shell Programming and Scripting
Hi,
I am looking for a sed/awk script to join two large (~300 M) single column files (one is sorted and the other is not sorted) side-by-side. I have a shell script but its taking ages to do the task so looking for an optimized fast solution.
The two files look like:
File1 (sorted)
a1... (1 Reply)
Discussion started by: sajal.bhatia
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Thank you for your help in advance :D.
I have thousands of files like...
file01
file02
file03
.
.
.
file6324
I would like to paste every other file side by side so it looks like
file01 file02
file03 file04
...e.t.c
file6323 file6324 (3 Replies)
Discussion started by: shaz1990
3 Replies
10. Shell Programming and Scripting
I have 8 .csv files with 16 columns and "n" rows with no Header. I want to parse each of these .csv and get column and put the data into a new.csv. Once this is done, the new.csv should have 16 columns (2 from each input.csv) and "n" rows.
Now, I want to just take the average of Column from... (3 Replies)
Discussion started by: Zam_1234
3 Replies
LEARN ABOUT FREEBSD
sdiff
SDIFF(1) User Commands SDIFF(1)
NAME
sdiff - side-by-side merge of file differences
SYNOPSIS
sdiff [OPTION]... FILE1 FILE2
DESCRIPTION
Side-by-side merge of file differences.
-o FILE --output=FILE
Operate interactively, sending output to FILE.
-i --ignore-case
Consider upper- and lower-case to be the same.
-E --ignore-tab-expansion
Ignore changes due to tab expansion.
-b --ignore-space-change
Ignore changes in the amount of white space.
-W --ignore-all-space
Ignore all white space.
-B --ignore-blank-lines
Ignore changes whose lines are all blank.
-I RE --ignore-matching-lines=RE
Ignore changes whose lines all match RE.
--strip-trailing-cr
Strip trailing carriage return on input.
-a --text
Treat all files as text.
-w NUM --width=NUM
Output at most NUM (default 130) print columns.
-l --left-column
Output only the left column of common lines.
-s --suppress-common-lines
Do not output common lines.
-t --expand-tabs
Expand tabs to spaces in output.
--tabsize=NUM
Tab stops are every NUM (default 8) print columns.
-d --minimal
Try hard to find a smaller set of changes.
-H --speed-large-files
Assume large files and many scattered small changes.
--diff-program=PROGRAM
Use PROGRAM to compare files.
-v --version
Output version info.
--help Output this help.
If a FILE is `-', read standard input. Exit status is 0 if inputs are the same, 1 if different, 2 if trouble.
AUTHOR
Written by Thomas Lord.
REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>.
COPYRIGHT
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for sdiff is maintained as a Texinfo manual. If the info and sdiff programs are properly installed at your site,
the command
info diff
should give you access to the complete manual.
diffutils 2.8.7 April 2004 SDIFF(1)