---------- Post updated at 10:17 PM ---------- Previous update was at 10:12 PM ----------
cant I say extract the date part from the last characters of the string:
awk lets me substr characters from the start of the string..how about substr characters from the end of the string, with the last character as the first character
Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.
i think grep can only find char in files matching a pattern without any wildcards like ? correct? It works with * but not ?.
how can i write a small c program to find words in a file, like a list, that matches a pattern like ma?y, b??con, etc if grep doesn't understand ? in a pattern search. if... (1 Reply)
Hi Guys,
Can you help with the shell script:
I would like to search a fixed width pattern from a file
say for each line from a fixed position and lenght it has to return all rows from the file.
Example:
To search the third column for "def" it has to return 1 and 4th rows only
... (2 Replies)
I have a problem in searching a specific pattern in c files.
My requirement:
I have to find all the division operator in all cfiles.
The problem is, the multi line comments and single line comments will also have forward slash in it.
Even after avoiding these comments also, if both... (6 Replies)
can anybode tell me ? I want to search for a pattern present in a whole directory and subdirectories's files containg " crat"
I tried
grep -r "crat" */* ;
is it right ? (3 Replies)
Hi All,
Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read value
# check if the user has... (1 Reply)
Hi,
I need small help from you people.
In a directory there are around 150 odd files and few them contain the word "TRACK" and few are not.
How can I find out the the list of those files which doesn't contain the word "TRACK"?
Thanks,
Siba (4 Replies)
in my file i have somthing likre
kpk_12
kpk_1
kpk_1.tcl
kpk_3.tcl
kpk
kpk
kpk
i want search only kpk i am using this cmd /kpk ...results it is showing all . any cmd is ther other then this to search exactword in this example kpk it shoulsnot show kpk_* etc
Thanks in Advance
... (2 Replies)
Hi there,
Looking forward to your advice for the below:
I have a file which contains 2 paragraphs related to a particular pattern. I have to search for those paragraphs from a log file and then print a particular line from those paragraphs.
Sample:
I have one file with the fixed... (3 Replies)
Discussion started by: danish0909
3 Replies
LEARN ABOUT PHP
udm_add_search_limit
UDM_ADD_SEARCH_LIMIT(3) 1 UDM_ADD_SEARCH_LIMIT(3)udm_add_search_limit - Add various search limitsSYNOPSIS
bool udm_add_search_limit (resource $agent, int $var, string $val)
DESCRIPTION udm_add_search_limit(3) adds search restrictions.
PARAMETERS
o $agent
- A link to Agent, received after call to udm_alloc_agent(3).
o $var
- Defines the parameter, indicating limits. Possible $var values:
o UDM_LIMIT_URL - defines document URL limitations to limit the search through subsection of the database. It supports SQL %
and _ LIKE wildcards, where % matches any number of characters, even zero characters, and _ matches exactly one character.
E.g. http://www.example.___/catalog may stand for http://www.example.com/catalog and http://www.example.net/catalog.
o UDM_LIMIT_TAG - defines site TAG limitations. In indexer-conf you can assign specific TAGs to various sites and parts of a
site. Tags in mnoGoSearch 3.1.x are lines, that may contain metasymbols % and _. Metasymbols allow searching among groups
of tags. E.g. there are links with tags ABCD and ABCE, and search restriction is by ABC_ - the search will be made among
both of the tags.
o UDM_LIMIT_LANG - defines document language limitations.
o UDM_LIMIT_CAT - defines document category limitations. Categories are similar to tag feature, but nested. So you can have
one category inside another and so on. You have to use two characters for each level. Use a hex number going from 0-F or a
36 base number going from 0-Z. Therefore a top-level category like 'Auto' would be 01. If it has a subcategory like 'Ford',
then it would be 01 (the parent category) and then 'Ford' which we will give 01. Put those together and you get 0101. If
'Auto' had another subcategory named 'VW', then it's id would be 01 because it belongs to the 'Ford' category and then 02
because it's the next category. So it's id would be 0102. If VW had a sub category called 'Engine' then it's id would start
at 01 again and it would get the 'VW' id 02 and 'Auto' id of 01, making it 010201. If you want to search for sites under
that category then you pass it cat=010201 in the URL.
o UDM_LIMIT_DATE - defines limitation by date the document was modified. Format of parameter value: a string with first
character < or >, then with no space - date in unixtime format, for example:
Example #1
<?php
udm_add_search_limit($udm, UDM_LIMIT_DATE, "<908012006");
?>
If > character is used, then the search will be restricted to those documents having a modification date greater than
entered, if <, then smaller.
o $val
- Defines the value of the current parameter.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
PHP Documentation Group UDM_ADD_SEARCH_LIMIT(3)