hi,
I am searching error and exception in my log and >> to report file,
my code is :
sed -n '//p;//p' $ARIBA_LOG_DIR/MyLog.txt >> $LOG_ERR_REP
I need to report avove 5 line, that line and bellow 5 line..
what change is required in my code? (1 Reply)
I am new to UNIX......I have one file which contains thousnads of records with header and tailer.
Header
Record 1
Record 2
....
....
Last Record
Trailer
I want to concatenate Header and Trailer in the first line....now the output should look like this:
Header: Header value, Trailer:... (2 Replies)
Hello,
I have a logfile which is in this format:
1211667249500#3265
1211667266687#2875
1211667270781#1828
Is there a way to read the logfile line by line every time I execute the code and put the two numbers in the line in two separate variables?
Something like:
1211667249500#3265... (7 Replies)
HI i have to copy the last 5000 lines form a log file and copy the same in the same file .overwriting the same log file.
ex: tail -5000 testfile1 > testfile2
cat testfile2
mv tesftfile2 testfile1
will produce the correct result.but i want to have this done in one line???? (4 Replies)
I know this has been asked before but I just can't parse the syntax as explained. I have a set of files that has user information spread out over two lines that I wish to merge into one:
User1NameLast User1NameFirst User1Address
E-Mail:User1email
User2NameLast User2NameFirst User2Address... (11 Replies)
Can anyone explain the below sed oneliner?
sed -e ':a' -e '$q;N;11,$D;ba'
It works same as tail command.
I just want to know how it works.
Thanks (1 Reply)
Hi All,
I am new to unix.
In this forum some days back, I have read something like below:
1) Do not use perl if awk can do your work.
2) Do not use awk if sed can do your work.
.
.
.
I do not re-collect the whole thing. I think it is good to know the precedence of using these... (2 Replies)
Hi,
I am running a script sample.sh in bash environment .In the script i am using sed and awk commands which when executed individually from terminal they are getting executed normally but when i give these sed and awk commands in the script it is giving the below errors :-
./sample.sh: line... (12 Replies)
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies
LEARN ABOUT SUSE
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)