10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all
how to count words from a text
aaa bbb ccc ddd
123 aaa 123 aaa
aaa ddd 123
i need to cout hoe many time the words "aaa" and "123" each appears
the output should be
4 3
or
4
3
or
aaa 4
123 3
thanks (10 Replies)
Discussion started by: sharong
10 Replies
2. Shell Programming and Scripting
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
3. UNIX for Dummies Questions & Answers
Hello,
i want built a log analyzer for nginx. Okay and i use it as training for the shell tools. The most what i want i could relize. But i has trouble with dynamic things. I have the IP address extracted and has set the geo localtion for the ip.
I would like to count the countries. With... (3 Replies)
Discussion started by: sisihagen
3 Replies
4. Shell Programming and Scripting
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)
Discussion started by: jmarx
1 Replies
5. Shell Programming and Scripting
hi every one i have written this simple shell for counting number of word that user need to find from file
but i have get several error when run it. can someone tell me the problem ?
echo "Enter the file name"
read file
echo "enter word"
read word
for i in \`cat $file`
do
if
then... (1 Reply)
Discussion started by: nimafire
1 Replies
6. Shell Programming and Scripting
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)
Discussion started by: mohit_iitk
3 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have 50 text files in a directory called "AllFiles"
I want to make a program that will go inside of the "AllFiles" Directory and count the number of lines in each individual text file. Then, the program will calculate how many more lines there are over 400 in each text file and... (7 Replies)
Discussion started by: motoxeryz125
7 Replies
8. Shell Programming and Scripting
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies
9. Shell Programming and Scripting
Hi Pls help in solving my doubt.Iam having file like below
file1.txt
priya
jenny
jenny
priya
raj
radhika
priya
bharti
bharti
Output required:
I need a output like count of repeated words with name for ex:
priya 3
jenny 2 (4 Replies)
Discussion started by: bha148
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
how could you go about removing words that begin with a certain character.
assuming that this character is '-' I currently have
echo "-hello" | sed s/-/""/
which replaces the leading dash with nothing but I want to remove the whole word, even if there are multiple words beginning... (3 Replies)
Discussion started by: skinnygav
3 Replies
SKEYINIT(1) BSD General Commands Manual SKEYINIT(1)
NAME
skeyinit -- change password or add user to S/Key authentication system
SYNOPSIS
skeyinit [-sxz] [-k passphrase] [-n count] [-p password] [-t hash] [user]
DESCRIPTION
skeyinit initializes the system so you can use S/Key one-time passwords to login. The program will ask you to enter a secret pass phrase;
enter a phrase of several words in response. After the S/Key database has been updated you can login using either your regular password or
using S/Key one-time passwords.
skeyinit requires you to type a secret password, so it should be used only on a secure terminal.
OPTIONS
-k passphrase
Use pass phrase passphrase instead of asking for one to be entered.
-n count
Start the skey(1) sequence at count (default is 100).
-p password
Use password password instead of asking for one to be entered.
-s allows the user to set the seed and count for complete control of the parameters. To do this run skeyinit in one window and put in
your count and seed; then run skey(1) in another window to generate the correct 6 english words for that count and seed. You can
then ``cut-and-paste'' or type the words into the skeyinit window.
-t hash
Selects the hash algorithm to use. Available choices are md4 (the default), md5, or sha1.
-x Displays one-time password in hexadecimal instead of ASCII.
-z Allows the user to zero their S/Key entry.
user The username to be changed/added. By default the current user is operated on, only root may change other user's entries.
FILES
/etc/skeykeys database of information for the S/Key system.
SEE ALSO
skey(1), skeyaudit(1), skeyinfo(1)
AUTHORS
Phil Karn
Neil M. Haller
John S. Walden
Scott Chasin
BSD
September 19, 2005 BSD