Hi Radoulov,
I have tried the code for testing as I too required this on numbers of occasion to combining two line having length of 132 characters .I am
using RedHat 9 Linux.
I am using like if ( nr % 2 == o ) or
if ( nr % 3 == 0 ) and fetching the data from the... (0 Replies)
suppose the user enters: ./Myfile blah1 blah2 blah3
I want to be able to read that in as: blah1blah2blah3
IN ONE VARIABLE
Obviously I can print it out in one line excluding the white space, but I'm having trouble combining argv, argv, ....., argv together!
This is what I tried, but I... (3 Replies)
I am trying to take 2 files and merge them into a single file pulling one line out of each file at a time. Below is an example of what I am trying to do, thanks for any help in advance.
Example of File 1:
a1
b1
c1
Example of File 2:
a2
b2
c2
Expected Outcome:
a1
a2
b1
b2
c1
c2 (2 Replies)
Hi all,
I have a file with lot of lines with repeating pattern. ( TABLE_NAME line followed by Total line).
I would like combine these two lines into one line seperated by cama and create a new file. Is there a simple way to do this.
Current Format ( just a sample 4 lines )
TABLE_NAME:... (10 Replies)
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Hi Friends,
I have a file1.txt
1001 jkilo yrhfm
200056 jhdf rjhwjkrh
3+u8jk5h3 uru ehjk
1002 jkfhk hfjkd
2748395 fdjksfh hefjkh
3hdfk ejkh kjhjke
In the above if you see the firt charcter of each line mentioned in red has a pattern .
I need to create another file where , the... (6 Replies)
Hello guys, I have a problem with two text files. I want to join them line by line with a bash script if it is possible. I think an example will be much clear;
FILE 1
314.01 83.826
52.43 79.544
316.36 45.283
351.15 87.503
FILE 2
140.323 84.918
130 78.256
120 77.603
118 ... (4 Replies)
i have a file (where the column values are separated by ' and the text can be enclosed in ~) which contains data in form of
4461,2,~Basic:
2 Years/Unlimited Miles
Drivetrain:
Gas Engine
2 Years/Unlimited Miles
Duramax Engine
3 Years/Unlimited... (2 Replies)
Hi
below is the input file snippet.
here i want that all the line which is coming after 1 shoud be in one line.
so for exanple if after 1 there is two lines which is starting with 2 should be combine in one line.
input file content
1,8091012,BATCH_1430903_01,21,T,2,808738,,,,21121:87:01,... (19 Replies)
COMBINE(1)COMBINE(1)NAME
combine - combine sets of lines from two files using boolean operations
SYNOPSIS
combine file1 and file2
combine file1 not file2
combine file1 or file2
combine file1 xor file2
_ file1 and file2 _
_ file1 not file2 _
_ file1 or file2 _
_ file1 xor file2 _
DESCRIPTION
combine combines the lines in two files. Depending on the boolean operation specified, the contents will be combined in different ways:
and Outputs lines that are in file1 if they are also present in file2.
not Outputs lines that are in file1 but not in file2.
or Outputs lines that are in file1 or file2.
xor Outputs lines that are in either file1 or file2, but not in both files.
"-" can be specified for either file to read stdin for that file.
The input files need not be sorted, and the lines are output in the order they occur in file1 (followed by the order they occur in file2
for the two "or" operations). Bear in mind that this means that the operations are not commutative; "a and b" will not necessarily be the
same as "b and a". To obtain commutative behavior sort and uniq the result.
Note that this program can be installed as "_" to allow for the syntactic sugar shown in the latter half of the synopsis (similar to the
test/[ command). It is not currently installed as "_" by default, but you can alias it to that if you like.
SEE ALSO join(1)AUTHOR
Copyright 2006 by Joey Hess <joey@kitenet.net>
Licensed under the GNU GPL.
moreutils 2012-04-09 COMBINE(1)