11-17-2016
Any attempts/ideas/thoughts from your side?
Are those the verbatim ASCII control characters <CR> (\r, 0x0D, ^M) and <NL> (\n, 0x0A, ^J), or two chars each, "\" and "r" or "\" and "n"?
Please note that there's NO single quote in field 4
Quote:
|123|Mukesh\r\n|Vivek"sharma|
so your spec wouldn't apply.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
thank u optimus,but one more dout..it might be silly..how do i get the value in the file that should be replaced..while running the script..its an numeric value..that i want to change..
when i used sed for replacement ie.
sed s/521000/100/p
with print option it is printing... (4 Replies)
Discussion started by: Babu
4 Replies
2. Shell Programming and Scripting
Hi ,
I have some data in my file(properties.txt) like this.
# agent.properties
agent.dmp.Location=
agent.name=
I need to relpace the
agent.dmp.location with agent.dmp.Location = /opt/VRTS/vxvm
I am using the follwing to replace the string
AGENT_NAME=snmp... (2 Replies)
Discussion started by: raghu.amilineni
2 Replies
3. Shell Programming and Scripting
Hi there,
I have a file generated by a windows registry (it's unicode) and can't get to do some replacements on it. I want to join lines that end with backslash with the next one.
santiago@ks354286:~$ cat win.reg
ÿþWindows Registry Editor Version 5.00
... (10 Replies)
Discussion started by: chebarbudo
10 Replies
4. Shell Programming and Scripting
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Discussion started by: DevendraG
2 Replies
5. Shell Programming and Scripting
Hi all,
I have two files, one is a base file and the other is a dependency file.
I need to replace a section in the base file (File A) with a section from the dependency file (File B), for example:
File A:
...
<TagName>
<TagA>MyBaseFile</TagA>
<TagB>MyBaseFileID</TagB>
</TagName>... (5 Replies)
Discussion started by: muay_tb
5 Replies
6. Shell Programming and Scripting
HI Guys ,
Using UNIX ,I intend to check with correct file pattern Access_file_Record.YYYYMM in path /tmp
If the file exist in correct format come out from code .
If not found check with different file patterns for same month period YYYYMM ( Like Access_file_Record_YYYYMM.txt or... (8 Replies)
Discussion started by: Perlbaby
8 Replies
7. Shell Programming and Scripting
Hello scriping expert friends,
I have 2 requirements on replacing fields of text files:
I have lot of data with contents like below:
Requirement-1:
The digit after 0 should always be changed to 1 (3 Replies)
Discussion started by: magnus29
3 Replies
8. UNIX for Dummies Questions & Answers
I had a doubt regarding how the file size changes and needed some advice on the same
So I have this file say abc.txt.. Size was 10000. Now inside the file when I go and I replace all the number 7 numerals with number 4 file size changed to 9984. Any idea why and how ?? (8 Replies)
Discussion started by: sidnow
8 Replies
9. Shell Programming and Scripting
I want to replace a string by contents of file.
I am trying the following sed command:
cat sample | sed "s^<enter description here>^`cat details`^"
But it is not working.
a=`cat details` and using $a will not help since it will affect the whitespaces.
What am I missing in the above sed... (5 Replies)
Discussion started by: anand_bh
5 Replies
10. Shell Programming and Scripting
Dear all,
I have a "SQL request" in a file: that request include different "host variable" and I would like to substitute the different "host variable" by their respective content before executing the request.
For example:
$ echo $SHELL
/bin/bash
$ cat dae2.txt
DELETE FROM ... (11 Replies)
Discussion started by: dae
11 Replies
LEARN ABOUT PHP
eventbuffer
EVENTBUFFER(3) 1 EVENTBUFFER(3)
The EventBuffer class
INTRODUCTION
EventBuffer represents Libevent's "evbuffer", an utility functionality for buffered I/O.
Event buffers are meant to be generally useful for doing the "buffer" part of buffered network I/O.
CLASS SYNOPSIS
EventBuffer
EventBuffer
Constants
o const integer$EventBuffer::EOL_ANY0
o const integer$EventBuffer::EOL_CRLF1
o const integer$EventBuffer::EOL_CRLF_STRICT2
o const integer$EventBuffer::EOL_LF3
o const integer$EventBuffer::PTR_SET0
o const integer$EventBuffer::PTR_ADD1
Properties
o publicreadonly int$length
o publicreadonly int$contiguous_space
Methods
o public bool EventBuffer::add (string $data)
o public bool EventBuffer::addBuffer (EventBuffer $buf)
o public int EventBuffer::appendFrom (EventBuffer $buf, int $len)
o public EventBuffer::__construct (void )
o public int EventBuffer::copyout (string &$data, int $max_bytes)
o public bool EventBuffer::drain (int $len)
o public void EventBuffer::enableLocking (void )
o public bool EventBuffer::expand (int $len)
o public bool EventBuffer::freeze (bool $at_front)
o public void EventBuffer::lock (void )
o public bool EventBuffer::prepend (string $data)
o public bool EventBuffer::prependBuffer (EventBuffer $buf)
o public string EventBuffer::pullup (int $size)
o public string EventBuffer::read (int $max_bytes)
o public int EventBuffer::read (mixed $fd, int $howmuch)
o public string EventBuffer::readLine (int $eol_style)
o public mixed EventBuffer::search (string $what, [int $start = -1], [int $end = -1])
o public mixed EventBuffer::searchEol EventBuffer::EOL_ANY ([int $start = -1], [int $eol_style])
o public string EventBuffer::substr (int $start, [int $length])
o public bool EventBuffer::unfreeze (bool $at_front)
o public bool EventBuffer::unlock (void )
o public int EventBuffer::write (mixed $fd, [int $howmuch])
PROPERTIES
o $length
- The number of bytes stored in an event buffer.
o $contiguous_space
- The number of bytes stored contiguously at the front of the buffer. The bytes in a buffer may be stored in multiple separate
chunks of memory; the property returns the number of bytes currently stored in the first chunk.
PREDEFINED CONSTANTS
o EventBuffer::EOL_ANY - The end of line is any sequence of any number of carriage return and linefeed characters. This format is
not very useful; it exists mainly for backward compatibility.
o EventBuffer::EOL_CRLF - The end of the line is an optional carriage return, followed by a linefeed. (In other words, it is either
a "
" or a "
" .) This format is useful in parsing text-based Internet protocols, since the standards generally prescribe a
"
" line-terminator, but nonconformant clients sometimes say just "
" .
o EventBuffer::EOL_CRLF_STRICT - The end of a line is a single carriage return, followed by a single linefeed. (This is also known
as "
" . The ASCII values are 0x0D 0x0A ).
o EventBuffer::EOL_LF - The end of a line is a single linefeed character. (This is also known as "
" . It is ASCII value is 0x0A .)
o EventBuffer::PTR_SET - Flag used as argument of EventBuffer::setPosition method. If this flag specified, the position pointer is
moved to an absolute position within the buffer.
o EventBuffer::PTR_ADD - The same as EventBuffer::PTR_SET , except this flag causes EventBuffer::setPosition method to move position
forward up to the specified number of bytes(instead of setting absolute position).
PHP Documentation Group EVENTBUFFER(3)