I have ~100 text files in a directory that I am trying to parse and output to a new file. I am looking for the words chr,start,stop,ref,alt in each of the files. Those fields should appear somewhere in those files. The first two fields of each new set of rows is also printed. Since this is on a windows os I used "path\to\folder' in the bash
example of files to search (each is a seperate file)
desired output
Thank you .
I wanted to search in all the sub directories under /vob/project (recurse) in everything inside /vob/project.
search.run
for x in `cat search.strings`
do
find /vob/project -type f -print | xargs grep -i $x > ~/$x.txt
done
search.string
hello
whoami
I am getting the error ... (5 Replies)
Hi,
I have a file which contains the following :
select * from test where test_id=1;
select id
from test1, test2 where test_id=1 and test_id=2;
select * from
test1, test2, test3 where test_id=4 and test2_id where in (select test2_id from test2);
select
id1, id2 from test ... (6 Replies)
Hi all,
I am looking for a coomand to search for the keywords in susequenct lines. Keyword1 in a line and Keyword2 in the very next line.
Once i found the combination ineed to print the lines with patterns and the line above and one below.
I am giving an example here: Keywords are :ERROR and... (12 Replies)
Hi all,
how to recursively search for a list of keywords in a given directory??
for example:
suppose i have kept all the keywords in a file called "procnamelist" (in separate line)
and i have to search recursively in a directory called "target/dir"
if i am not doing recursive search then... (4 Replies)
I have a huge list of files in an Unix directory (around 10000 files).
I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40
Can someone let me know what would be the fastest way... (10 Replies)
have a very big file where need to format it like below
example file:
abcd today
is
great
day;
search keyword 'abcd' and append to it all words till we reach ; to make it a single line.
output should look like.
abcd today is great day;
There are many occurrence of such... (2 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Hi Team,
i have a web ui where user will be passing values and the output will be saved to a file say test with the following contents .
These below mentioned values will change according to the user_input
Just gave here one example
Contents of file test is given below
Gateway... (7 Replies)
Discussion started by: venkitesh
7 Replies
LEARN ABOUT PHP
bbcode_add_smiley
BBCODE_ADD_SMILEY(3) 1 BBCODE_ADD_SMILEY(3)bbcode_add_smiley - Adds a smiley to the parserSYNOPSIS
bool bbcode_add_smiley (resource $bbcode_container, string $smiley, string $replace_by)
DESCRIPTION
Adds a smiley to the parser
PARAMETERS
o $bbcode_container
- BBCode_Container resource, returned by bbcode_create(3).
o $smiley
- The string that will be replaced when found.
o $replace_by
- The string that replace smiley when found.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
bbcode_add_smiley(3) usage example
<?php
/*
* Prepare the rule set
*/
$arrayBBCode=array(
''=> array('type'=>BBCODE_TYPE_ROOT,
'childs'=>'!i'),
'b'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<b>',
'close_tag'=>'</b>'),
'u'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<u>',
'close_tag'=>'</u>',
'flags'=>BBCODE_FLAGS_SMILEYS_OFF),
'i'=> array('type'=>BBCODE_TYPE_NOARG,
'open_tag'=>'<i>',
'close_tag'=>'</i>',
'childs'=>'b'),
);
/*
* Parsed Text
*/
$text=<<<EOF
[i] No parse Test [/i] :)
[b] Parsed, with smiley :( [/b]
[u] Parsed, with no smiley :D [/u]
EOF;
/*
* Init the parser
*/
$BBHandler=bbcode_create($arrayBBCode);
/*
* Add Smiley rules to parser
*/
bbcode_add_smiley($BBHandler, ":)", "<img src="smiley.gif" alt=":)" />");
bbcode_add_smiley($BBHandler, ":(", "<img src="sad.gif" alt=":(" />");
bbcode_add_smiley($BBHandler, ":D", "<img src="happy.gif" alt=":D" />");
bbcode_add_smiley($BBHandler, ":p", "<img src="tong.gif" alt=":p" />");
bbcode_add_smiley($BBHandler, ":|", "<img src="special.gif" alt=":|" />");
bbcode_add_smiley($BBHandler, ":6:", "<img src="six.gif" alt=":6:" />");
/*
* Parse the text
*/
echo bbcode_parse($BBHandler,$text);
?>
The above example will output:
<i> No parse Test </i> <img src="smiley.gif" alt=":)" />
<b> Parsed, with smiley <img src="sad.gif" alt=":(" /> </b>
<u> Parsed, with no smiley :D </u>
PHP Documentation Group BBCODE_ADD_SMILEY(3)