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)
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,
Can you please help me out here? I am trying develop a search pattern to extract certain words from the two strings below.
I want to extract ericsson_msc_live from the 2 strings and then the date, which is a part of the filename just before the .jar extension.
... (19 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 LINUX
suspicious-source
SUSPICIOUS-SOURCE(1) General Commands Manual SUSPICIOUS-SOURCE(1)NAME
suspicious-source - search for files that are not the GPL's "preferred form of modification"
SYNOPSIS
suspicious-source [options]
DESCRIPTION
suspicious-source is a script that outputs a list of files which are not common source files. This should be run in the root of a source
tree to find files which might not be the "preferred form of modification" that the GPL and other licenses require.
The files inside version control system directories (like .bzr/ or CVS/) are not considered.
OPTIONS -h, --help
Show this help message and exit.
-v, --verbose
Print more information.
-d directory, --directory=directory
Check the files in the specified directory instead of the current directory.
-m mimetype, --mimetype=mimetype
Add mimetype to list of white-listed MIME types.
-e extension, --extension=extension
Add extension to list of white-listed extensions.
AUTHORS
suspicious-source and this manpage have been written by Benjamin Drung <bdrung@debian.org>.
Both are released under the ISC license.
DEBIAN Debian Utilities SUSPICIOUS-SOURCE(1)