It sounds a bit confusing but what I have is a text file like the example below (without the Line1, Line2, Line3 etc. of course) and I want to move every group of characters into a new line after each space.
Example of text file;
line1 .digg-widget-theme2 ul { background: rgb(0, 0, 0) none... (7 Replies)
Hi,
I am trying to grep a string which has two words separated by space.
I used a script to grep the string by reading the string in to a variable
command i used in the script is
echo "enter your string"
read str
grep $str <file>
it is working fine when the entered string is a single... (3 Replies)
I have several very large file that are extracts from Oracle tables. These files are formatted in XML type syntax with multiple entries like:
<ROW>
some information
more information
</ROW>
I want to grep for some words, then print all lines between <ROW> AND </ROW>. Can this be done with AWK?... (7 Replies)
hi!
i'm trying to get grep to do an exact match for the following pattern but..it's not quite working. I'm not too sure where did I get it wrong. any input is appreciated.
echo "$VAR" | grep -q '^test:]name'
if ; then
printf "test name is not found \n"
fi
on... (4 Replies)
Hey guys,
I'm having a bit of trouble getting this to work using either sed or grep. It's possible awk might be the ticket I need as well, but my regulat expression skills aren't quite up to the task for doing this.
I'm looking to grep for the string ERROR from the following log up until any... (6 Replies)
I have a large dataset with following structure;
C 0001 Carbon
D SAR001 methane
D SAR002 ethane
D SAR003 propane
D SAR004 butane
D SAR005 pentane
C 0002 Hydrogen
C 0003 Nitrogen
C 0004 Oxygen
D SAR011 ozone
D SAR012 super oxide
C 0005 Sulphur
D SAR013... (3 Replies)
I have a file xyz with the following content
PPPL 0123
PPPL 0006
POFT 0923
POFT 1111
WENT 2323
SEND 2345
I also have another file named MasterFile where it contains the above mentioned data million times with different digits at the end for example some times it contains SEND 9999 or WENT... (4 Replies)
Discussion started by: knijjar
4 Replies
LEARN ABOUT HPUX
setvbuf_unl
setbuf(3S)setbuf(3S)NAME
setbuf(), setvbuf(), setlinebuf() - assign buffering to a stream file
SYNOPSIS
Obsolescent Interface
DESCRIPTION
can be used after a stream has been opened but before it is read or written. It causes the array pointed to by buf to be used instead of
an automatically allocated buffer. If buf is the NULL pointer input/output will be completely unbuffered.
A constant defined in the header file, tells how big an array is needed:
can be used after a stream has been opened but before it is read or written. type determines how stream is to be buffered. Legal values
for type (defined in are:
causes input/output to be fully buffered.
causes output to be line buffered;
the buffer will be flushed when a newline is written, the buffer is full, or input is requested.
causes input/output to be completely unbuffered.
When an output stream is unbuffered, information is queued for writing on the destination file or terminal as soon as written; when it is
buffered, many characters are saved up and written as a block. When the output stream is line-buffered, each line of output is queued for
writing on the destination terminal as soon as the line is completed (that is, as soon as a new-line character is written or terminal input
is requested). can also be used to explicitly write the buffer.
If buf is not the NULL pointer, the array it points to is used for buffering instead of an automatically allocated buffer (from size speci-
fies the size of the buffer to be used. The constant in is suggested as a good buffer size. If input/output is unbuffered, buf and size
are ignored.
By default, output to a terminal is line buffered and all other input/output is fully buffered.
is used to change stream from block-buffered or unbuffered to line-buffered. can be used any time the file descriptor is active.
Obsolescent Interface
assigns buffering to a stream file.
DIAGNOSTICS
If an illegal value for type or size is provided, return a non-zero value. Otherwise, the value returned will be zero.
Note
A common source of error is allocating buffer space as an "automatic" variable in a code block, then failing to close the stream in the
same block.
Allocating a buffer of size or bytes does not necessarily imply that all of size or bytes are used for the buffer area.
AUTHOR
and were developed by HP.
SEE ALSO flockfile(3S), fopen(3S), getc(3S), malloc(3C), putc(3S), stdio(3S), thread_safety(5), glossary(9).
STANDARDS CONFORMANCE setbuf(3S)