10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello Experts,
I have a log file that contains 4 different type of exception :
1- Exception
2- Fatal
3- Error
4- Exec
My requirement is to find count of each type of exception, i tried using combination of -E and -C but that doesn't seems to be working :
grep -ec 'Exception' -ec... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
2. Shell Programming and Scripting
Hi all,
I need to run a bunch of commands seperated by ; but then count the total lines of output. Pipes and redirection don't seem to be helping me. Anyone know how I can do this properly:
ls /usr/bin/nslookup ; ls /usr/sbin/lsof ; ls /sbin/ifconfig ; ls /usr/sbin/dmidecode ; ls... (2 Replies)
Discussion started by: dan-e
2 Replies
3. Shell Programming and Scripting
I have a file that I need to count the number of "Y"s in the file, but just the "Y"s that fall between certain columns. Like:
file1:
1234567890123456789012345
BBBBBBYBBBBYBBYBBYBBYBBB
I want to count the 'Y's between 17 and 21 = 2 "Y"s
Thanks (12 Replies)
Discussion started by: jbt828
12 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have small query and a understanding, could you please clarify the query and correct my understanding..?
I am very big log file If i need to take a count and contained lines for a particular pattern/word i am using the grep command twice like the below.
grep -c "OutOfMemoryException"... (4 Replies)
Discussion started by: senthilkumar_ak
4 Replies
5. UNIX for Dummies Questions & Answers
I have created a file "pat".This file contains the text "abcdefghi". Now i want to count the characters in this file "pat". I gave wc -c | pat and it returns me exact count "9". Now when i tried like "echo pat | wc -m" It returns '4'. as for as i understand this command "echo pat | wc -m" should... (7 Replies)
Discussion started by: mdali_vl
7 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a script which removes 2 header records and 1 trailer record in a list of files. The commands doing the actions are
sed '1,2d' $file > tempfile1.dat
sed '$d' < tempfile1.dat > $output.txt
Its working fine for all records except a file having size=1445509814 and number of... (2 Replies)
Discussion started by: ayanbiswas
2 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I'm trying to count how many line in my *.txt file.
My *.txt file has 1937 lines.
The problem is : when I use wc -l command
the result is 1936.
Again, I did some test. I create a new file with 100 lines with text editor (Notepad ++, Ultra edit).
And when I count it again with wc... (2 Replies)
Discussion started by: kunimi
2 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Is there is a way to do this in a single unix command
I have unzipped some files into a directory ..
I want to check the count of the files in the directory and also i need to check whether the files is having read permision or not.. I know it can be done by a script isthere... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies
9. Shell Programming and Scripting
1. Is there a way to count the number of bytes of a variable?
example:
abc@yahoo.com is 13 bytes
2. Cut command only allows one byte for delimiter
example: cut -f1 -d'.'
delimited by period. Is there a way to have two or more characters in the delimiter field?
thanks in adavance.
:) (4 Replies)
Discussion started by: hemangjani
4 Replies
10. Shell Programming and Scripting
hi
plz let me know the command to count the files in directory.
thanks in advance
-Bali Reddy (4 Replies)
Discussion started by: balireddy_77
4 Replies