I am new for shell script, I hope somebody to help me to write shell script
My requirement is below steps
1. I have apache access.log i.e located in /var/log/httpd/
Ex.
2. Need to be first column is afte GET i.e we treated as name Ex: /common and /pl ...etc
if column match also needs to check Http status code i.e 404 or 200
for example match common and 404 needs to be push to one file we call it error.log
if not above condition remaining all goes to another file
some thing to /pl/, /UK/, /configurarator/ all goes to different files with respective of their cname folders.
really appreciate if help me.
Regards
Moderator's Comments:
Please use code tags next time for your code and data. Thanks
Hi,
I've a shell script e.g.
#!/bin/bash
echo "Enter the next hop id"
read nhid
echo "enter the IP address"
read IP
echo "enter the interface name"
read name
echo "enter the enable/disable state"
read state
exit 0
now from this script i want to search strings in another (.cam)
... (6 Replies)
Hi,
We Perfrom Loads to the database through a Perl script which generates a statistics file. I need to read the statistics. the Statistics file looks something like below:
Process Beginning - 08-26-2010-23.41.47
DB2 CONNECTION SUCCESSFUL!
Ready to process and load file: FILENAME
# of... (2 Replies)
File name : Sample.txt
Actually i would like to read <schema>Oracle<schema> string from input file and return only once database as my output.
Please advise me.
Moved to appropriate forum. (1 Reply)
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display... (1 Reply)
Hi everyone,
I am new to Unix and need help writing a script that can ask user for an input, then search that input within a file
I know will have to use the read and grep commands, anyone can give me somewhere to start would help
Task: Write a script to display which volume pool a given... (1 Reply)
Hi Don, this is not homework question. I work for a Credit card company and my development goal this year is to learn Unix. I would love if others can help me get started, thanks.
Hi everyone
I am new to Unix and need help writing a script that can ask user for an input, then search that input... (2 Replies)
Hello All
I have a pattern.txt file in source directory ((/project/source/) in linux server and data looks like:
123abc17
234cdf19
235ifg20
I have multiple log files in log directory (/project/log/) in linux server and data for one log file looks like:
<?xml version="1.0" processid... (11 Replies)
So, there is a large file where I have to conduct several search using bash shell scripting.
The file is like this:
TITLE and AUTHOR ETEXT NO. Aspects of plant life; with special reference to the British flora, 56900 by Robert Lloyd... (1 Reply)
I have a text file which is generated when the batch job is run. This batch may take few mins to run. When completed, the last line of the text file would be process completed. I need a shell script which will wait for this file till the process completed is printed in it, once found, it would move... (2 Replies)
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT DEBIAN
ns_connreturnnoresponse
Ns_ConnReturnStatus(3aolserver) AOLserver Library Procedures Ns_ConnReturnStatus(3aolserver)__________________________________________________________________________________________________________________________________________________NAME
Ns_ConnReturnBadRequest, Ns_ConnReturnForbidden, Ns_ConnReturnInternalError, Ns_ConnReturnNoResponse, Ns_ConnReturnNotFound, Ns_ConnReturn-
NotImplemented, Ns_ConnReturnNotModified, Ns_ConnReturnOk, Ns_ConnReturnStatus, Ns_ConnReturnUnauthorized, Ns_RegisterRedirect - Routines
to return simple standard responses
SYNOPSIS
#include "ns.h"
int
Ns_ConnReturnBadRequest(conn, msg)
int
Ns_ConnReturnForbidden(conn)
int
Ns_ConnReturnInternalError(conn)
int
Ns_ConnReturnNoResponse(conn)
int
Ns_ConnReturnNotFound(conn)
int
Ns_ConnReturnNotImplemented(conn)
int
Ns_ConnReturnNotModified(conn)
int
Ns_ConnReturnOk(conn)
int
Ns_ConnReturnStatus(conn, status)
int
Ns_ConnReturnUnauthorized(conn)
void
Ns_RegisterRedirect(server, status, url)
ARGUMENTS
Ns_Conn conn (in) Pointer to open connection.
char *msg (in) String with additional message text.
int status (in) Integer HTTP status code.
char *url (in) String which specifies internal redirection url.
char *server(in) Virtual server.
_________________________________________________________________DESCRIPTION
These routines are used to generate complete responses, including headers, approriate status codes, content types, and possibly short HTML
content messages for the most common HTTP error or status responses. They each coorespond to a particular HTTP status code, for example,
Ns_ConnReturnNotFound generates an HTTP 404 "Not Found" response. They all return NS_OK if the response was sent or NS_ERROR if an under-
lying routine failed.
The default behavior is to return an internal, server generated response possibly with a short English language message, for example "The
requested URL cannot be accessed by this server". This behavior can be modified by calling the Ns_RegisterRedirect to redirect responses
internally for the cooresponding HTTP status code to another URL on the server. The "redirects" server config section can be used to map
these redirects at startup
int Ns_ConnReturnBadRequest(conn, msg)
Returns an HTTP 400 response with the short HTML message "Invalid Request: The HTTP request presented by your browser is invalid."
The optional msg string, if present, is also included in the message body.
int Ns_ConnReturnForbidden(conn)
Returns an HTTP 403 response with the short HTML message "Forbidden: The requested URL cannot be accessed by this server."
int Ns_ConnReturnInternalError(conn)
Returns an HTTP 500 response with the short HTML message "Server Error: The requested URL cannot be accessed due to a system error
on this server."
int Ns_ConnReturnNoResponse(conn)
Equivalent to Ns_ConnReturnStatus(conn, 204).
int Ns_ConnReturnNotFound(conn)
Returns an HTTP 404 response with the short HTML message "Not Found: The requested URL was not found on this server."
int Ns_ConnReturnNotImplemented(conn)
Returns an HTTP 404 response with the short HTML message "Not Implemented: The requested URL or method is not implemented by this
server."
int Ns_ConnReturnNotModified(conn)
Equivalent to Ns_ConnReturnStatus(conn, 304).
int Ns_ConnReturnOk(conn)
Equivalent to Ns_ConnReturnStatus(conn, 200).
int Ns_ConnReturnStatus(conn, status)
Generates a response with the given HTTP status with no content.
int Ns_ConnReturnUnauthorized(conn)
Returns an HTTP 401 response with the short HTML message "Access Denied: The requested URL cannot be accessed because a valid user-
name and password are required." As "WWW-Authenticate: Basic realm=server realm" header is also included in the response.
void Ns_RegisterRedirect(server, status, url)
Redirect the above responses from the given server for the given status code from the simple internal messages described above to
the given internal url. The redirect is performed using Ns_ConnRedirect.
SEE ALSO Ns_ConnFlush(3), Ns_ConnRedirect(3), Ns_ConnSetRequiredHeaders(3), Ns_ConnQueueHeaders(3), ns_return(n)
KEYWORDS
connnection, response
AOLserver 4.0 Ns_ConnReturnStatus(3aolserver)