Hi,
I need to delete an empty directory in a temp directory except "dir5" (keep everything that is not empty).
Plese advise.
Here is an example of my directory.
/dir/temp/
dir1 - delete if this is empty
dir2 - delete if this is empty
dir3 - delete if this is empty
dir4 - delete if this... (7 Replies)
I know this one was answered before in forum below -
https://www.unix.com/unix-dummies-questions-answers/58210-removing-empty-folders-using-find-command.html
But that one is closed & I have a question so here it goes.
I want to delete all 2006 files. Now if along with the files, if the... (2 Replies)
Hello:
I searched here for "vi -c" but found no hits.
How can I use vi -c to remove ALL empty lines, regardless of how many?
I tried
<code>
vi -c ":g/^$/d | wq" filename
</code>
but I have to run it several times.
This is NOT homework. :)
Thanks for your time. (3 Replies)
Hi all,
I'm trying to remove when this condition is met: an empty and the next one
I'm using this command:
sed '/^$/N; s/&//' file
Which searches for an empty line, N attaches it to the next line, and substituing the combination with nothing.... but it is not working.
What I'm missing... (1 Reply)
Hi all !
I'm sure it is a basic question but I didn't find any threads that fit my need.
How to remove empty fields with awk?
Or in other words, how to shift all the fields after an empty field on the left?
input:
1|2||3|4|5||6
wanted:
1|2|3|4|5|6
I tried:
awk '{for(i=1; i<=NF;... (7 Replies)
Hello:
Is there a simple way to remove empty records of FASTA format file?
A FASTA format consists of two parts: header and sequence (for non-biologist, Wiki for details of course!). The header always start with ">" for the name of the sequence. The header must be in this ONLY single line.... (9 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Hi all,
I've got a file that has 12 fields. I've merged 2 files and there will be some duplicates in the following:
FILE:
1. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, 100
2. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, (EMPTY)
3. CDC, 54321, TEST3,... (4 Replies)
Discussion started by: tugar
4 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)