09-06-2010
Sorry for not being clear. And thanks for your response..
Here is the output from the system
oracle 1822968 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1826878 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1831026 1 0 Sep 03 - 0:00 oracleAAA (LOCAL=NO)
oracle 1835072 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1839210 1 0 Sep 03 - 0:00 oracleAAA (LOCAL=NO)
oracle 1847480 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1851540 1 0 Aug 31 - 0:00 oracleAAA (LOCAL=NO)
oracle 1855674 1 0 Aug 31 - 0:00 oracleAAA (LOCAL=NO)
oracle 1867886 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1876030 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1884172 1 0 Sep 01 - 0:00 ora_mmon_AAA (LOCAL=NO)
oracle 1888358 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1892466 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1896460 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1900702 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1896460 1 0 Sep 01 - 0:00 oracleAAA (LOCAL=NO)
oracle 1900702 1 0 Sep 01 - 0:00 ora_ckpt_AAA
oracle 1896460 1 0 Sep 01 - 0:00 ora_qmnc_AAA
oracle 1900702 1 0 Sep 01 - 0:00 ora_psp0_AAA
oracle 1822968 1 0 Sep 01 - 0:00 oracleBBB (LOCAL=NO)
oracle 1826878 1 0 Sep 01 - 0:00 oracleBBB (LOCAL=NO)
oracle 1831026 1 0 Sep 03 - 0:00 oracleBBB (LOCAL=NO)
oracle 1835072 1 0 Sep 01 - 0:00 oracleBBB (LOCAL=NO)
oracle 1839210 1 0 Sep 03 - 0:00 oracleBBB (LOCAL=NO)
oracle 1847480 1 0 Sep 01 - 0:00 oracleBBB (LOCAL=NO)
oracle 1851540 1 0 Aug 31 - 0:00 oracleBBB (LOCAL=NO)
oracle 1900702 1 0 Sep 01 - 0:00 ora_ckpt_BBB
oracle 1896460 1 0 Sep 01 - 0:00 ora_qmnc_BBB
oracle 1900702 1 0 Sep 01 - 0:00 ora_psp0_BBB
I'd like to count how many lines for AAA and how many lines for BBB
The desired output I'm looking for is:
AAA: 19
BBB: 10
Appreciate your help. Thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi experts,
First of all thanks for all your help.
How can i count the lines within a text file and send this number to another text file?
And by the way how can i count the number of files inside a tape ("/dev/rtp") that as one pattern (Ex. "/CTA/") and send this number to a text file?
I... (6 Replies)
Discussion started by: jorge.ferreira
6 Replies
2. Linux
Hello,
I have afile which begins with a few urls on multiple lines and then there is listing of some information on separate lines.
The listing begins with the word Name on a given line followed by teh actual list.
I want to count the number of lines in this file after the line having... (6 Replies)
Discussion started by: nayeemmz
6 Replies
3. UNIX for Dummies Questions & Answers
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (4 Replies)
Discussion started by: aga
4 Replies
4. Shell Programming and Scripting
I have a file called xx with the env redirected into it 5 times:
env >> xx
env >> xx
env >> xx
env >> xx
env >> xx
I have to read an input file (here: xx) and look for occurrences of the current user who is executing this script. Once finding an occurrence of the username I have to take that... (2 Replies)
Discussion started by: aga
2 Replies
5. Shell Programming and Scripting
Hi Guys,
I have a file as follows:
wwe
khfgv
jfo
wwe
jhgfd
wwe
wwe
hoaha
hao
lkahe
wwe (13 Replies)
Discussion started by: npatwardhan
13 Replies
6. Shell Programming and Scripting
Hi,
I have a little problem with counting lines. I know similar topics from this forum, but they don't resolve my problem. I have file with lines like this:
2009-05-25 16:55:32,143 some text some regular expressions ect.
2009-05-25 16:55:32,144 some text.
2009-05-28 18:15:12,148 some... (4 Replies)
Discussion started by: marcinnnn
4 Replies
7. UNIX for Advanced & Expert Users
I'm trying to write a script to clean up log file automatically when it reaches 1000 lines. I can't get this to work..can some help me please :)
Server: SunOS 5.8 Generic_117350-53 sun4u sparc SUNW,Netra-T12
#!/bin/ksh
#file reference
file=`echo "$HOME/support/moe/b.tc"`
#linecount... (7 Replies)
Discussion started by: moe458
7 Replies
8. Shell Programming and Scripting
Hi,
I'm using the command: sed -n '$=' $1 on a sh script on AIX.
This script is used to count the number of lines of files.
If the file has no lines at all the command doesn't return nothing.
I need the command to return 0 when the file has no lines at all.
How can I achieve this?
Best... (5 Replies)
Discussion started by: jppedroso
5 Replies
9. UNIX for Dummies Questions & Answers
Counting number of lines: sp
I am trying to figure out a script to count the number of text files in cywig and have it give me a number (as the answer) any help would be appreciated.
I am new here, so be gentle :D (3 Replies)
Discussion started by: unicksjp
3 Replies
10. Shell Programming and Scripting
tail -f /var/log/syslog | egrep -c FATAL
is there a way to do the above and actually have the number of lines matching the pattern increment as it is logged to the log file?
for instance, when you invoke a command like the one i just posted, you'll not get the total lines unless you do... (4 Replies)
Discussion started by: SkySmart
4 Replies
LEARN ABOUT LINUX
grub-fstest
GRUB-FSTEST(1) User Commands GRUB-FSTEST(1)
NAME
grub-fstest - debug tool for GRUB filesystem drivers
SYNOPSIS
grub-fstest [OPTION...] IMAGE_PATH COMMANDS
DESCRIPTION
Debug tool for filesystem driver.
Commands:
blocklist FILE
Display blocklist of FILE.
cmp FILE LOCAL
Compare FILE with local file LOCAL.
cp FILE LOCAL
Copy FILE to local file LOCAL.
crc FILE
Get crc32 checksum of FILE.
hex FILE
Hex dump FILE.
ls PATH
List files in PATH.
-c, --diskcount=N
N input files.
-d, --debug=S
Set debug environment variable.
-n, --length=N
Handle N bytes in output file.
-r, --root=DEVICE_NAME
Set root device.
-s, --skip=N
Skip N bytes from output file.
-v, --verbose
Print verbose messages.
-?, --help
give this help list
--usage
give a short usage message
-V, --version
print program version
Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.
SEE ALSO
grub-probe(8)
The full documentation for grub-fstest is maintained as a Texinfo manual. If the info and grub-fstest programs are properly installed at
your site, the command
info grub-fstest
should give you access to the complete manual.
grub-fstest (GRUB) 1.99-12ubuntu5 October 2011 GRUB-FSTEST(1)