Hi All,
silly question that I'm sure is easy to answer for a more experienced coder...
I have a file called test.txt containing the following text...
need, to, break, this, line, into, individual, lines
using sed, I'd like to make the file look like this...
need
to
break
this
line... (5 Replies)
hi
i want to replace spaces by comma
my file is
ADD 16428 170 160 3 WNPG 204 941 No 204802
ADD 16428 170 160 3 WNPG 204 941 No 204803
ADD 16428 170 160 3 WNPG 204 941 No 204804
ADD... (9 Replies)
Hi,
How can I replace the 6th comma on each line (of a csv) with a space?
Any online tutorials with plenty of examples using sed would be very useful.
Alex (2 Replies)
I have a huge file
which is pipe delimiter and i want to replace the pipe delimiter to a comma
Please Help as its v urgent.
Ex: parent|child|alias|....Heading of the file...and the data is of similar structure. (4 Replies)
I have the following text as an input text:
input.txt
Results('Toilet', 'Sink', )
and i want to remove the last comma so the output is
output.txt
Results('Toilet', 'Sink' )
I tried using the following sed command, but I get a parsing error:
sed s/, \)/\)/g input.txt >... (5 Replies)
Hi
I am working on xml file. I have to make sure below lines containing values within quotes are replaced by some character like "-".
Below are different lines in xml file.
Pattern 1:
<Connector port=....
.....
keystoremyPass="xxx" />
Pattern 2:
myword="xxxxx"
... (11 Replies)
Discussion started by: krsnadasa
11 Replies
LEARN ABOUT PHP
stream_filter_remove
STREAM_FILTER_REMOVE(3) 1 STREAM_FILTER_REMOVE(3)stream_filter_remove - Remove a filter from a streamSYNOPSIS
bool stream_filter_remove (resource $stream_filter)
DESCRIPTION
Removes a stream filter previously added to a stream with stream_filter_prepend(3) or stream_filter_append(3). Any data remaining in the
filter's internal buffer will be flushed through to the next filter before removing it.
PARAMETERS
o $stream_filter
- The stream filter to be removed.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Dynamicly refiltering a stream
<?php
/* Open a test file for reading and writing */
$fp = fopen("test.txt", "rw");
$rot13_filter = stream_filter_append($fp, "string.rot13", STREAM_FILTER_WRITE);
fwrite($fp, "This is ");
stream_filter_remove($rot13_filter);
fwrite($fp, "a test
");
rewind($fp);
fpassthru($fp);
fclose($fp);
?>
The above example will output:
Guvf vf a test
SEE ALSO stream_filter_register(3), stream_filter_append(3), stream_filter_prepend(3).
PHP Documentation Group STREAM_FILTER_REMOVE(3)