Many thanks it worked fast and zipped through over 700,000 records in no time.
The only hassle:
when a word has more than one occurence and therefore frequencies, all the frequencies belonging to that word are stored on one line.
example
How do I get the script to store these on separate lines. My frequency merge script accepts
and merges them.
If it is not too much of a hassle could you please comment that code. I tried to modify the script but it mangled the results.
Many thanks once more
Hello,
I have a complex problem. I have a file in which words have been joined together:
Theboy ranslowly
I want to be able to correctly split the words using a lookup file in which all the words occur:
the
boy
ran
slowly
slow
put
child
ly
The lookup file which is meant for look up... (21 Replies)
I need to write a shell script "cmn" that, given an integer k, print the k most common words in descending order of frequency.
Example Usage:
user@ubuntu:/$ cmn 4 < example.txt :b: (3 Replies)
Dear all,
I am working with names and I have a large file of names in which some words are written together (upto 4 or 5) and their corresponding single forms are also present in the word-list.
An example would make this clear
annamarie
mariechristine
johnsmith
johnjoseph smith
john
smith... (8 Replies)
Hello,
I have a very large file of around 2 million records which has the following structure:
I have used the standard awk program to sort:
# wordfreq.awk --- print list of word frequencies
{
# remove punctuation
#gsub(/_]/, "", $0)
for (i = 1; i <= NF; i++)
freq++
}
END {
for (word... (3 Replies)
Hello,
I have a file which has the following structure
word space Frequency
The file is around 30,000 headwords each along with its frequency. The words have different lengths. What I need is a PERL or AWK script which can sort the file on length of the headword and once the file is sorted on... (12 Replies)
Hello,
I have a large file of syllables /strings in Urdu. Each word is on a separate line.
Example in English:
be
at
for
if
being
attract
I need to identify the frequency of each of these strings from a large corpus (which I cannot attach unfortunately because of size limitations) and... (7 Replies)
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Hello,
I would like to change my setting in a file to the setting that user input.
For example, by default it is
ONBOOT=ON
When user key in "YES", it would be
ONBOOT=YES
--------------
This code only adds in the entire user input, but didn't replace it.
How do i go about... (5 Replies)
tr -cs A-Za-z\' '\n' | tr A-Z a-z | sort | uniq -c | sort -k1,1nr -k2 | sed ${1:-25} < book7.txt
This is not my script, it can be found way back from 1980 but once it worked fine to give me the most used words in a text file.
Now the shell is complaining about an error in sed
sed: -e... (5 Replies)
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies
LEARN ABOUT SUSE
tabs
tabs(1) General Commands Manual tabs(1)NAME
tabs - set tabs on a terminal
SYNOPSIS
tabs [-v[n]] [-ahuUV] file...
DESCRIPTION
The tabs program clears and sets tab-stops on the terminal. This uses the terminfo clear_all_tabs and set_tab capabilities. If either is
absent, tabs is unable to clear/set tab-stops. The terminal should be configured to use hard tabs, e.g.,
stty tab0
OPTIONS
General Options
-Tname
Tell tabs which terminal type to use. If this option is not given, tabs will use the $TERM environment variable. If that is not set,
it will use the ansi+tabs entry.
-d The debugging option shows a ruler line, followed by two data lines. The first data line shows the expected tab-stops marked with
asterisks. The second data line shows the actual tab-stops, marked with asterisks.
-n This option tells tabs to check the options and run any debugging option, but not to modify the terminal settings.
The tabs program processes a single list of tab stops. The last option to be processed which defines a list is the one that determines the
list to be processed.
Implicit Lists
Use a single number as an option, e.g., "-5" to set tabs at the given interval (in this case 1, 6, 11, 16, 21, etc.). Tabs are repeated up
to the right margin of the screen.
Explicit Lists
An explicit list can be defined after the options (this does not use a "-"). The values in the list must be in increasing numeric order,
and greater than zero. They are separated by a comma or a blank, for example,
tabs 1,6,11,16,21
tabs 1 6 11 16 21
Use a '+' to treat a number as an increment relative to the previous value, e.g.,
tabs 1,+5,+5,+5,+5
which is equivalent to the 1,6,11,16,21 example.
Predefined Tab-Stops
X/Open defines several predefined lists of tab stops.
-a Assembler, IBM S/370, first format
-a2 Assembler, IBM S/370, second format
-c COBOL, normal format
-c2 COBOL compact format
-c3 COBOL compact format extended
-f FORTRAN
-p PL/I
-s SNOBOL
-u UNIVAC 1100 Assembler
PORTABILITY
X/Open describes a +m option, to set a terminal's left-margin. None of the entries in the terminal database provide this capability.
The -d (debug) and -n (no-op) options are extensions not provided by other implementations.
Documentation for other implementations states that there is a limit on the number of tab stops. While some terminals may not accept an
arbitrary number of tab stops, this implementation will attempt to set tab stops up to the right margin of the screen, if the given list
happens to be that long.
SEE ALSO tset(1), infocmp(1), ncurses(3NCURSES), terminfo(5).
This describes ncurses version 5.7 (patch 20100109).
tabs(1)