09-15-2009
I like that. I'll have to remember that! It works great and it is simple. Thanks Sanjay.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
When we "grep" for a word in a file, it returns the lines containing the word that we searched for. Is there a way to display only the words and not the entire line containing them.
Thanks
Ananth (6 Replies)
Discussion started by: ananthmm
6 Replies
2. UNIX for Dummies Questions & Answers
hi, consider the below line in a text file,
'Y',getdate(),'N','V',NULL .....
'N',getdate(),'Y','D',NULL .....
'Y','N','Y',getdate(),'Y','D',NULL ....
as u see above, i want only the second word after the getdate() word...
getdate() will not come 2nd word alwys it may be any position but i... (11 Replies)
Discussion started by: prsam
11 Replies
3. Shell Programming and Scripting
ok, so this is proving to be kind of difficult even though it should not be.
say for instance I want to grep out ONLY the word fkafal from the below output, how do I do it?
echo ajfjf fjfjf iafjga fkafal foeref afoafahfia | grep -w "fkafal"
If i run the above command, i get back all the... (4 Replies)
Discussion started by: SkySmart
4 Replies
4. Shell Programming and Scripting
Hi,
I have input file as below. Can you help me?
inac_4y;0;2;Balance;200;1;1;
0;2;Balance;100;1;
0;inac_nq;0;1;Balance;100;1
desired output
Balance;200
Balance;100
Balance;100
-Suresh
Please use and tags when posting code, data or logs etc. to preserve formatting... (5 Replies)
Discussion started by: suresh3566
5 Replies
5. Shell Programming and Scripting
Hi all,
FileOne
family balance >>>>>
0 0
0 0
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
..
....
.....
.....
java.lang.NullPointerException
...
.....
......
Stacktrace:
at... (2 Replies)
Discussion started by: linuxadmin
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have gone through may posts and dint find exact solution for my requirement.
I have file which consists below data and same file have lot of other data.
<MAPPING DESCRIPTION ='' ISVALID ='YES' NAME='m_TASK_UPDATE' OBJECTVERSION ='1'>
<MAPPING DESCRIPTION ='' ISVALID ='NO'... (11 Replies)
Discussion started by: tmalik79
11 Replies
7. Shell Programming and Scripting
Hi
can we grep for a word and print the next word of the greped word?
ex:- create or replace function function_name
create function function_name
we should search for word "function" and output next word "function_name" from both lines. (3 Replies)
Discussion started by: manasa_vs
3 Replies
8. Shell Programming and Scripting
Hi,
Below is an example :
ST1 PREF: int1 AVAIL: int2
ST2 PREF :int1 AVAIL: int2
I need int1 to come in preferred variable while programming and int2 in available variable
Please help me doing so
Best regards,
Vishal (10 Replies)
Discussion started by: Vishal_dba
10 Replies
9. Shell Programming and Scripting
Hi Folks,
Could you please advise what will be the SED command to replace a word in all xml's under a particular directory
for example let say I rite now at the following below location
$ cd /ter/rap/config
now under config directory there will be lots of xml file , now my objective is to... (1 Reply)
Discussion started by: punpun66
1 Replies
10. Shell Programming and Scripting
I have a file "test" with following contents:
cat test
abc
abcd_efg
abc_abc
I want to only grep for abc or abc_ without getting other results, how do I achieve this?
If I use grep -w abc test option I get only abc and not abc_.
If I use egrep "abc|abc_" test its still printing... (3 Replies)
Discussion started by: ctrld
3 Replies
LEARN ABOUT LINUX
apachetop
apachetop(1) USER COMMANDS apachetop(1)
NAME
apachetop - display real-time web server statistics
SYNOPSIS
apachetop [-f filename] [-H hits | -T time] [-q] [-l] [-s segments] [-p] [-r secs]
DESCRIPTION
ApacheTop watches a logfile generated by Apache (in standard common or combined logformat, and generates human-parsable output in realtime.
OPTIONS
-f logfile
Select which file to watch. Specify this option multiple times to watch multiple files.
-H hits | -T time
These options are mutually exclusive. Specify only one, if any at all. They work as follows. ApacheTop maintains a table of informa-
tion internally containing all the relevant information about the hits it's seen. This table can only be a finite size, so you need
to decide how big it's going to be. You have two options. You can either: Use -H to say "remember <this many> hits" or Use -T to
say "remember all hits in <this many> seconds" The default (at the moment) is to remember hits for 30 seconds. Setting this too
large (whichever option you choose) will cause ApacheTop to use more memory and more CPU time. My experimentation finds that remem-
bering no more than around 5000 requests works well.
-q Instructs ApacheTop to keep the querystrings, not remove them.
-l Instructs ApacheTop to lowercase all URLs, thus /FOO and /foo are treated as the same and accumulate the same statistics.
-s segments
Instructs ApacheTop to only keep the first <segments> parts of the path. Trailing slashes are kept if present. Statistics are then
merged for each truncated url.
-p Instructs ApacheTop to keep the protocol (http:// usually) at the front of its' referrer strings. Normal behaviour is to remove them
to give more room to more useful information.
-r secs
Set default refresh delay, in seconds.
EXAMPLES
apachetop -f /var/logs/httpd/access.log
AUTHOR
Chris Elsworth <chris@shagged.org>
SEE ALSO
http://www.webta.org/projects/apachetop/
version 0.10 February 13, 2004 apachetop(1)