I have created these files in a particular directory
a_1.txt
a_2.txt
...
..
a_n.txt
Each file has a single line.
I want to write a output file a.txt, which will have concantated value of string from all the files.
which utility should i use. copy, cat or paste????
Can anyone help... (5 Replies)
I have two files, each of them has 12 lines, fileA has 3 columns, fileB has 1 column, like the following
FileA
a 1
b 2
c 3
..blabla
FileB
A
B
C
..blabla
Now I am trying to put the content of fileB as column 3 of fileA, e.g.
a 1 A
b 2 B
c 3 C (3 Replies)
hi,
i am facing a problem in merging two files using awk,
the problem is as stated below,
file1:
A|B|C|D|E|F|G|H|I|1
M|N|O|P|Q|R|S|T|U|2
AA|BB|CC|DD|EE|FF|GG|HH|II|1
....
....
....
file2 :
1|Mn|op|qr (2 Replies)
hi
i have two files
file1
1234567
1234678
1234679
file2
98765|jjkskk|9393|iyutr
98765|kkooo|9393|hjjjd
98765|abcvfg|9393|sskds
output should be
1234567|jjkskk|9393|iyutr
1234678|kkooo|9393|hjjjd
1234679|abcvfg|9393|sskds (5 Replies)
Hello,
i'd like a bash script to merge 2 files without duplicate lines.
Example :
file1 :
toto
titi
file2 :
toto
tata
Expected result, file3 :
toto (5 Replies)
Hi,
I would like to know how can I merge files based on their coordinates, but mantaining the score of each file in the output file like:
Note: 1st column is for chromosome, 2nd for start, 3rd for end of segment, 4th for score
file1:
1 200 300 20
1 400 500 30
file2:
1 200 350 30
1... (1 Reply)
Hi,
My requirement is,there is a directory location like:
:camp/current/
In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Dear Gents,
Please I need your help... I need small script :) to do the following.
I have a thousand of files in a folder produced daily.
I need first to merge all files called. txt (0009.txt, 0010.txt, 0011.txt) and and to output a resume of all information on 2 separate files in csv... (14 Replies)
Discussion started by: jiam912
14 Replies
LEARN ABOUT DEBIAN
ids2ngram
IDS2NGRAM(1) User Contributed Perl Documentation IDS2NGRAM(1)NAME
ids2ngram - generate n-gram data file from ids file
SYNOPSIS
ids2ngram [option]... ids_file...
DESCRIPTION
ids2ngram generates idngram file, which is a sorted [id1,..,idN,freq] array, from binary id stream files. Here, the id stream files are
always generated by mmseg or slmseg. Basically, it finds all occurrence of n-words tuples (i.e. the tuple of (id1,..,idN)), and sorts these
tuples by the lexicographic order of the ids make up the tuples, then write them to specified output file.
INPUT
The input file is presented as a binary id stream, which looks like:
[id0,...,idX]
OPTIONS
All the following options are mandatory.
-n,--NMax N
Generates N-gram result. ids2ngram does only support uni-gram, bi-gram, and trigram, so any number not in the range of 1..3 is not
valid.
-s,--swap swap-file
Specify the temporary intermediate file.
-o, --out output-file
Specify the result idngram file, e.g. the array of [id1, ..., idN, freq]
-p, --para N
Specify the maximum n-gram items per paragraph. ids2ngram writes to the temporary file on a per-paragraph basis. Every time it writes a
paragraph out, it frees the corresponding memory allocated for it. When your computer system permits, a higher N is suggested. This can
speed up the processing speed because of less I/O.
EXAMPLE
Following example will use three input idstream file idsfile[1,2,3] to generate the idngram file all.id3gram. Each para (internal map size
or hash size) would be 1024000, using swap file for temp result. All temp para result would eventually be merged to got the final result.
ids2ngram -n 3 -s /tmp/swap -o all.id3gram -p 1024000 idsfile1 idsfile2 idsfile3
AUTHOR
Originally written by Phill.Zhang <phill.zhang@sun.com>. Currently maintained by Kov.Chai <tchaikov@gmail.com>.
SEE ALSO mmseg(1), slmseg(1), slmbuild (1).
perl v5.14.2 2012-06-09 IDS2NGRAM(1)