10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to figure out to find word count of each word from my file
sample file
hi how are you
hi are you ok
sample out put
hi 1
how 1
are 1
you 1
hi 1
are 1
you 1
ok 1
wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
Discussion started by: mirwasim
4 Replies
2. Shell Programming and Scripting
HI Guys,
I have Input:- A
nput A.txt
000100/port_xcu_dev_6/port_0_dev_7
000100/port_xcu_dev_6/port_1_dev_10
000100/port_xcu_dev_2/port_2_dev_8
000100/port_xcu_dev_3/port_3_dev_11
000100/port_xcuv_9/port_4_dev_9 ... (3 Replies)
Discussion started by: pareshkp
3 Replies
3. Shell Programming and Scripting
hello
how can i cont number of char with loop coomand?
i dont want to use wc or other special command
the script should check all word's char. one by one
also a counter can handle the number
As noted in other threads started today. This is not the correct forum for homework assignments. ... (2 Replies)
Discussion started by: nimafire
2 Replies
4. Shell Programming and Scripting
Hello,
I have some problem in counting char of word, sum and change. I'm not sure shell script can do this.
Input data:
Sam1 BB BB AA AA BB BB BB
Sam2 BB BB AA AA AB AB AB
Sam3 BB BB BB AA BB BB BB
Sam4 AB AB AB AB AB AB AA
Sam5 BB BB AA AA BB BB -- If I count in column 2, B is 9... (3 Replies)
Discussion started by: awil
3 Replies
5. UNIX for Dummies Questions & Answers
Hi
I am having a 'grep' headache
Here is the contents of my file:
(PBZ,CP,(((ME,PBZ,BtM),ON),((ME,((PBZ,DG),(CW9,PG11))),CW9,TS2,RT1)))
I would like to count out how many times 'PBZ' occurs and then place that number in the line above
3... (8 Replies)
Discussion started by: cavanac2
8 Replies
6. UNIX for Advanced & Expert Users
Script that lists all words used in one or more files and displays their count (pattern /\W+/ to split the lines of the input file into words can b used)..
It should display list in format word:count...gets Filename as an cmd line argument!
eg: $perl test doc (where doc is d file we are going to... (4 Replies)
Discussion started by: aadi_uni
4 Replies
7. Shell Programming and Scripting
Hi all, I am trying to write a command that can help me count the number of lines in the /etc/passwd file ending in bash.
I have read through other threads but am yet to find one indicating how to locate a specifc word at the end of a line. I know i will need to use the wc command but when i... (8 Replies)
Discussion started by: warlock129
8 Replies
8. Fedora
could someone explain this please.
echo aaaa|wc -c
5
echo aaaa|wc -m
5
But I'd expect the count to be 4
Its SunOS 5.8
Thanks in Advance. (5 Replies)
Discussion started by: chaandana
5 Replies
9. UNIX for Dummies Questions & Answers
Hi ..
I am having file say at 53rd position it will be as 0's or 1's .. How can i count the total number of 1's and 0's in the files at the 53 rd location.
Thanks,
Arun (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
10. UNIX for Dummies Questions & Answers
hi,
given a file
i need to get the first line and secodn line
and count each of the line whether the length of first line and second line is the same
i don;t know how to get the length of the line...seems like use 'wc' cannot do it...
please advice (1 Reply)
Discussion started by: ariuscy
1 Replies