I am writing my first shell script to do the following:
Find all occurrences of a directory from the pwd
Delete the directory (which is a hidden directory)
Provide feedback w/ the number of directories deleted
The problems I am having are two-fold:
The user may not have the appropriate... (2 Replies)
Hi
Could anybody tell me how to count the number of occurances of a character within a LINE.
actually i have a single line with words seperated with '+' chracter e.g.
abc+def+ghj+jkl+asd
i want to separte the words above.
Please provide the necessary logic in the form of a SHELL... (6 Replies)
I want to find the number of occurences of a character in a file.
How do i do it.
Eg:
$cat file1.txt
Welcome to World of Unix.
$
If i want to find the occurences of 'o' then I should be getting 3.
Thanks. (6 Replies)
Hi,
I have a fixed width file in the following format
Sr.No A.No Name
1 2 PPP
3 4 PPP
5 6 TTT
7 8 OOO
9 10 OOO
11 12 OOO
The 3rd column starts at position 10 and ends at 15. I want to count the number of occurances of each Name and output to a file
Example in the... (2 Replies)
I've written a script to count the total size of SAN storage LUNs, and also display the LUN sizes.
From server to server, the LUNs sizes differ.
What I want to do is count the occurances as they occur and change.
These are the LUN sizes:
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95... (2 Replies)
Gurus,
Need little guidance.
I have A.txt and B.txt file. B.txt file contains Unique strings.
Sample content of B.txt file for which i cut the fourth column uniquely and output directed to B.txt file
And A.txt file contains the above string as a fourth column which is last column.
So A.txt... (7 Replies)
I have a file as shown below. I need to count the unique occurrences of numbers in the first and second column only if the third column is <= 10. Otherwise print the corresponding numbers as zero.
Thanks in advance!:)
58 80 40.74
76 80 9.78
76 80 8
12 6 9
30 28 8.23
45 12 ... (13 Replies)
I have some text files as shown below. I would like to add the values of each string. Your help would be appreciated!!
file1.txt
SUS 2
PRS 2
ALI 1
PRS 1
GLK 2
file2.txt
PRS 3
GLK 6
SUS 18
Desired output
SUS 20
PRS 6 (2 Replies)
Guys
I am trying grep to read from pattern file and count occurances of each word.
input is
firstplace
secondplace
secondpot
patternfile is
place
first
second
i want the following.
1-count number of times keywords in patternfile occurs in begining of each line in input file.
so... (12 Replies)
Discussion started by: ahfze
12 Replies
LEARN ABOUT LINUX
apachectl
apache2ctl(8) System Manager's Manual apache2ctl(8)NAME
apache2ctl - Apache HTTP server control interface
SYNOPSIS
When acting in SysV init mode, apache2ctl takes simple, one-word commands, defined below.
apachectl command
apache2ctl command
When acting in pass-through mode, apache2ctl can take all the arguments available for the httpd binary.
apachectl [httpd-argument]
apache2ctl [httpd-argument]
DESCRIPTION
apache2ctl is a front end to the Apache HyperText Transfer Protocol (HTTP) server. It is designed to help the administrator control the
functioning of the Apache apache2 daemon.
NOTE: The default Debian configuration requires the environment variables APACHE_RUN_USER, APACHE_RUN_GROUP, and APACHE_PID_FILE to be set
in /etc/apache2/envvars.
The apache2ctl script returns a 0 exit value on success, and >0 if an error occurs. For more details, view the comments in the script.
OPTIONS
The command can be any one or more of the following options:
start Start the Apache daemon. Gives an error if it is already running.
stop Stops the Apache daemon.
restart Restarts the Apache daemon by sending it a SIGHUP. If the daemon is not running, it is started. This command automatically
checks the configuration files via configtest before initiating the restart to to catch the most obvious errors. However,
it is still possible for the daemon to die because of problems with the configuration.
fullstatus Displays a full status report from mod_status. For this to work, you need to have mod_status enabled on your server and a
text-based browser such as lynx available on your system. The URL used to access the status report can be set by setting the
APACHE_STATUSURL variable in /etc/apache2/envvars.
status Displays a brief status report. Similar to the fullstatus option, except that the list of requests currently being served is
omitted.
graceful Gracefully restarts the Apache daemon by sending it a SIGUSR1. If the daemon is not running, it is started. This differs
from a normal restart in that currently open connections are not aborted. A side effect is that old log files will not be
closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that
the old log files are closed before processing them. This command automatically checks the configuration files via
apache2ctl configtest before initiating the restart to to catch the most obvious errors. However, it is still possible for
the daemon to die because of problems with the configuration.
graceful-stop Gracefully stops the Apache httpd daemon. This differs from a normal stop in that currently open connections are not
aborted. A side effect is that old log files will not be closed immediately.
configtest Run a configuration file syntax test. It parses the configuration files and either reports Syntax Ok or information about the
particular syntax error. This test does not catch all errors.
help Displays a short help message.
The following option was available in earlier versions but has been removed.
startssl To start httpd with SSL support, you should edit your configuration file to include the relevant directives and then use the
normal apache2ctl start.
ENVIRONMENT
The behaviour of apache2ctl can be influenced with these environment variables: APACHE_HTTPD, APACHE_LYNX, APACHE_STATUSURL,
APACHE_ULIMIT_MAX_FILES, APACHE_RUN_DIR, APACHE_LOCK_DIR, APACHE_RUN_USER, APACHE_ARGUMENTS, APACHE_ENVVARS. See the comments in the
script for details. These variables (except APACHE_ENVVARS) can be set in /etc/apache2/envvars.
SEE ALSO apache2(8), /usr/share/doc/apache2/README.Debian.gz
April 2008 apache2ctl(8)