06-12-2012
The above is not the full content of the file .. its a portion of the file ..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)
Discussion started by: frustrated1
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am new to this forum and i would like to get help in this issue.
I have a file 1.txt as shown:
apple
banana
orange
apple
grapes
banana
orange
grapes
orange
....
Now i would like to search for pattern say apple or orange and then put a # at the beginning of the pattern... (2 Replies)
Discussion started by: imas
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I think you ppl did not get my question correctly, let me explain
I have 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
... (1 Reply)
Discussion started by: imas
1 Replies
4. Shell Programming and Scripting
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
example:
in a file I have this.
gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin
if i find feedthru_pin want to insert !! at the... (7 Replies)
Discussion started by: pitagi
7 Replies
5. Shell Programming and Scripting
Hi all,
I am trying to extract the values ( text between the xml tags) based on the Order Number.
here is the sample input
<?xml version="1.0" encoding="UTF-8"?>
<NJCustomer>
<Header>
<MessageIdentifier>Y504173382</MessageIdentifier>
... (13 Replies)
Discussion started by: oky
13 Replies
6. Shell Programming and Scripting
i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies
7. Shell Programming and Scripting
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Discussion started by: swayam123
4 Replies
8. Shell Programming and Scripting
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies
9. Shell Programming and Scripting
Hi,
I've written a script to search for an Oracle ORA- error on a log file, print that line and the .trc file associated with it as well as the dateline of when I assumed the error occured. In most it is the first dateline previous to the error.
Unfortunately, this is not a fool proof script.... (2 Replies)
Discussion started by: newbie_01
2 Replies
10. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
LEARN ABOUT DEBIAN
ns_connreturnadminnotice
Ns_ConnReturnData(3aolserver) AOLserver Library Procedures Ns_ConnReturnData(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
Ns_ConnReturnAdminNotice, Ns_ConnReturnData, Ns_ConnReturnHtml, Ns_ConnReturnNotice - Routines to generate simple single-buffer responses
SYNOPSIS
#include "ns.h"
int
Ns_ConnReturnAdminNotice(conn, status, title, msg)
int
Ns_ConnReturnData(conn, status, data, len, type)
int
Ns_ConnReturnCharData(conn, status, data, len, type)
int
Ns_ConnReturnHtml(conn, status, msg, len)
int
Ns_ConnReturnNotice(conn, status, title, msg)
ARGUMENTS
Ns_Conn conn (in) Pointer to open connection.
int status (in) HTTP response status code.
char *type (in) Output content type.
char *title (in) Pointer to HTML page title string.
int len (in) Length of content buffer.
char *data (in) Pointer to content buffer.
char *msg (in) Pointer to HTML message buffer.
_________________________________________________________________
DESCRIPTION
These routines are used to generate complete responses, including headers, status codes, content types, and the requested data. They all
return a status code which is NS_OK if the response was sent or NS_ERROR if an underlying call to sent the content failed.
int Ns_ConnReturnAdminNotice(conn, status, title, msg)
This routine is equivalent to Ns_ConnReturnNotice. In prior versions, it would format a slightly different response which was later
considered inconsequential.
int Ns_ConnReturnData(conn, status, data, len, type)
Generates a reponse with the given HTTP status including a content-type header with the given type. Content pointed to by the data
argument of length len is then sent without any modification via an underlying call to Ns_ConnFlushDirect.
int Ns_ConnReturnCharData(conn, status, data, len, type)
Generates a response as with Ns_ConnReturnData except that the given content pointed to by data is assumed to be a text stream which
is output encoded using the appropriate Tcl_Encoding based on the given type mimetype and possibly gzip compressed via an underlying
call to Ns_ConnFlush.
int Ns_ConnReturnHtml(conn, status, msg, len)
This is equivalent to Ns_ConnReturnCharData(conn, status, msg, len, "text/html").
int Ns_ConnReturnNotice(conn, status, title, msg)
Constructs a basic HTML response and sends it via Ns_ConnReturnHtml. The title string is placed both in the <head> portion as well
as an <h2> tag in the <body> portion of the document. If the title is NULL, it defaults to the string "Server Message". The msg
string, if not NULL, follows the body and is copied unaltered. This routine is useful for generating very basic responses. For
example, it is used by the various builtin reponse routines such as Ns_ConnReturnUnauthorized.
SEE ALSO
Ns_ConnFlush(3), Ns_ConnReturnFile, Ns_ConnReturnOpenFd, Ns_ConnReturnUnathorized.
KEYWORDS
connnection, encoding, response
AOLserver 4.0 Ns_ConnReturnData(3aolserver)