that helps a lot
but when I run it on a big file, it repeats the word
like if I have the words
bad, bad. bad: bad,
it will show
2 bad,
1 bad.
1 bad:
I only want to count the word itself so I have to delete punctuation to get it right I guess
by the way what is /12 stand for???
Quote:
Originally Posted by hergp
Try
The output looks like
---------- Post updated at 06:03 PM ---------- Previous update was at 05:59 PM ----------
---------- Post updated at 06:07 PM ---------- Previous update was at 06:03 PM ----------
I couldn't implement this on what I've
I don't understand the logic behind this code
which I don't know where to add the file that I'm suppose to count the words in it
Quote:
Originally Posted by tarun_agrawal
echo "1 2 3 3 2 1" | xargs -n 1 | awk '{a[$0]++} END{for(i in a) {print i , a[i]} }'
I want to count the number of occurence of perticular word from one text file.
Please tell me "less" command is work in ksh or not. If it is not working then instead of that which command will work. :confused: (40 Replies)
Hi Folks !!!!!!!!!!!!!!!!!!!
My Requirement is.............
i have a input file:
501,501.chan
502,502.anand
503,503.biji
504,504.raja
505,505.chan
506,506.anand
507,507.chan
and my o/p should be
chan->3
i.e. the word which occurs maximum number of times in a file should be... (5 Replies)
Hi all
Can anybody suggest me, how to get the count of digits in a word
I tried
WORD=abcd1234
echo $WORD | grep -oE ] | wc -l
4
It works in bash command line, but not in scripts :mad: (12 Replies)
I've been looking on the internet, and haven't found anything simple enough to use in my code. All I want to do is count how many times "-" occurs in a string of characters (as a package name). It seems it should be very simple, and shouldn't require more than one line to accomplish.
And this is... (2 Replies)
hello everyone,
I'm trying to learn some scripts but i cant get my head around two of them.
1. how can i write a script that will count the number of times a particular word is used in file?
2. how can i make a script that will take me to a web page from unix?
if anyone could help it... (3 Replies)
Hi All,
I wanted to know if there is a shell command to print a word n number of times
The Input File is :
Cat 4
Bat 3
Zall 1
Kite 2
Output File required is :
Cat
Cat
Cat
Cat
Bat
Bat
Bat
Zall
Kite (4 Replies)
Hello Is there a way to calculate how many times a particular symbol appeared in a string before a particular word.
Desktop/Myfiles/pet/dog/puppy
So, I want to count number of occurence of"/" in this directory before the word dog lets say.
Cheers,
Bob (3 Replies)
can i get a simple script for , Count same word which has come many times in single lines & pars
Eg file would be ==
"Thanks heman thanks thanks
Thanks heman
thanks man"
So resullt should be
Thanks = 5
heman=2
man = 1
thanks in advance :)
Please use code tags for code and... (1 Reply)
Discussion started by: heman96
1 Replies
LEARN ABOUT FREEBSD
badsect
BADSECT(8) BSD System Manager's Manual BADSECT(8)NAME
badsect -- create files to contain bad sectors
SYNOPSIS
badsect bbdir sector ...
DESCRIPTION
The badsect utility makes a file to contain a bad sector. Normally, bad sectors are made inaccessible by the standard formatter, which pro-
vides a forwarding table for bad sectors to the driver. If a driver supports the bad blocking standard it is much preferable to use that
method to isolate bad blocks, since the bad block forwarding makes the pack appear perfect, and such packs can then be copied with dd(1).
The technique used by this program is also less general than bad block forwarding, as badsect cannot make amends for bad blocks in the i-list
of file systems or in swap areas.
On some disks, adding a sector which is suddenly bad to the bad sector table currently requires the running of the standard DEC formatter.
Thus to deal with a newly bad block or on disks where the drivers do not support the bad-blocking standard badsect may be used to good
effect.
The badsect utility is used on a quiet file system in the following way: First mount the file system, and change to its root directory. Make
a directory BAD there. Run badsect giving as argument the BAD directory followed by all the bad sectors you wish to add. (The sector num-
bers must be relative to the beginning of the file system, but this is not hard as the system reports relative sector numbers in its console
error messages.) Then change back to the root directory, unmount the file system and run fsck(8) on the file system. The bad sectors should
show up in two files or in the bad sector files and the free list. Have fsck(8) remove files containing the offending bad sectors, but do
not have it remove the BAD/nnnnn files. This will leave the bad sectors in only the BAD files.
The badsect utility works by giving the specified sector numbers in a mknod(2) system call, creating an illegal file whose first block
address is the block containing bad sector and whose name is the bad sector number. When it is discovered by fsck(8) it will ask ``HOLD BAD
BLOCK ?''. A positive response will cause fsck(8) to convert the inode to a regular file containing the bad block.
DIAGNOSTICS
The badsect utility refuses to attach a block that resides in a critical area or is out of range of the file system. A warning is issued if
the block is already in use.
SEE ALSO fsck(8)HISTORY
The badsect utility appeared in 4.1BSD.
BUGS
If more than one sector which comprise a file system fragment are bad, you should specify only one of them to badsect, as the blocks in the
bad sector files actually cover all the sectors in a file system fragment.
BSD June 5, 1993 BSD