Ksh Searching for a string within a file and keeping a count= get the following Sample01=: command
I have a script that goes through a 24 hr logfile, And i want to count the instances of a Test01 to 83 and output the sum of all the instances over 24hrs
The output is as follows:
What is the issue with using the following in the code:
Last edited by Scrutinizer; 07-02-2012 at 05:01 AM..
Reason: code tags
Is there a way to search an entire file system for the occurance of a string..... other than grep.
I have a large directory structure and I'm not certain that grep <string> */*/*/*... is all that effective - especially as I can't be sure of the number of levels to go down without heaps of... (3 Replies)
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
I need to search for a specific string in a file and if this string exist I need to replace it with something else. I am not sure how I could do this, using an if statement. (2 Replies)
Hi,
I am new to unix shell scripting.
I have a requirement.
Could anyone help me writing the script for the same?
Here goes the requirement:
I have a config file let's say temp.config.
Here is the data in the config file
temp.config :
-------------
name=victor
age=42
state=texas... (5 Replies)
I found some posts describing how to completely clean out a mailbox in Unix/Linux. But I want to keep the 50 most recent messages. Any ideas out there?
Thanks! (3 Replies)
Hi Guys...
I want to search for each file that contains a particular string.
e.g find . -print | xargs grep -i string_name
Now my issue is the files that I search in are gzipped.
Will I be able to find the string, using the above commands, even if the files are gzipped?
Please... (2 Replies)
Hi
I am trying to search for a certain set of patterns within a file, and then perform other commands based on output.
testfile contents:
password requisite pam_cracklib.so lcredit=-1 ucredit=-1 ocredit=-1
script:
D="dcredit=-1"
if
then
echo $D exists
else
echo $D doesnt... (8 Replies)
KSH
HP-SOL-Lin
Cannot use xAWK
I have several strings that are quite long and i want to break them down into smaller substrings.
What I have
String = "word1 word2 word3 word4 .....wordx"
What I want
String1="word1 word2"
String2="word 3 word4"
String3="word4 word5"
Stringx="wordx... (5 Replies)
Hello,
I have a file name like FIRST_DPF_DAILY_CUST_0826152322.txt
i need to extract the string after the third "_" underscore upto timestamp ends i.e CUST_0826152322
can anyone help me with the code
Thank you!
Regards
Srikanth Sagi (3 Replies)
So I'm trying to search for the top 10 or 15 items under a directory by file type. I want to run a command on a directory and get something like the following:
Example of expected output.. .PDF: 100, .txt: 95, .word: 80..
What would be the best way of going about this? I've searched around... (2 Replies)
Discussion started by: shackle101
2 Replies
LEARN ABOUT DEBIAN
passenger-status
passenger-status(8) Adminstration Commands passenger-status(8)NAME
passenger-status - inspect Phusion Passenger's internal status
SYNOPSIS
passenger-status [pid]
DESCRIPTION
passenger-status looks at the current status of a Phusion Passenger installation. It will locate Phusion Passenger automatically if it is
running and will give you a list of instances if there is more than one Phusion Passenger instance running. You can then select the
instance by specifying the relevant PID on the command line.
The general information section shows the following details:
max The maximum number of application instances that Phusion Passenger will spawn. This equals the value given for PassengerMaxPoolSize
in the configuration.
count The number of application instances that are currently alive. This value is always less than or equal to max.
active The number of application instances that are currently processing requests. This value is always less than or equal to count.
inactive
The number of application instances that are currently not processing requests, i.e. are idle. Idle application instances will be
shutdown after a while, as can be specified with PassengerPoolIdleTime in the configuration. The value of inactive equals count -
active.
The applications section shows each application instance, which directory it belongs to. The sessions field shows how many HTTP client are
currently being processed by that application instance.
OPTIONS
pid The process ID of the Phusion Passenger instance you want to look at
SEE ALSO passenger-memory-stats(8), ps(1), top(1)
User guide at http://www.modrails.com/documentation.html
AUTHOR
Phusion Passenger is written by Phusion (http://www.phusion.nl)
"Phusion" and "Phusion Passenger" are trademarks of Hongli Lai & Ninh Bui.
This manual page was written by Neil Wilson <neil@brightbox.co.uk> for the Ubuntu project (but may be used by others).
Phusion Passenger 2.0 passenger-status(8)