02-23-2006
But there's a minor correction.. your expression won't work unless the combined saerch pattern is enclosed within parantheses... otherwise the output would only contain the names of files with extension *.ini..
the actual expression is:
find . \( -name "*.ksh" -o -name "*.sql" -o -name "*.ini" \) ...
or else we get only files ending in .ini as the output.
Cheers,
Sirisha
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i was just wondering if any one had a good example of finding mutliple file types with the -o option or any other alternatives.
find . \( -name "*.txt" -o -name "*.tag" \)
for some reason i'm not having much luck and the man page isn't very descriptive.
what i am trying to do is find all... (6 Replies)
Discussion started by: Shakey21
6 Replies
2. Solaris
I have appended a tar file to my installation script so that while installing i can unzip from there (specifying the starting line number) and install a package.
This work fine if i add one tar file. But suppose i have to install different packages depending on the platform the script is run. i... (0 Replies)
Discussion started by: vikashtulsiyan
0 Replies
3. UNIX for Advanced & Expert Users
Hi,
On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files.
a) /usr/users/oracle/bin
b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
4 files are returned when i issue 'find . -mtime -1 -type f -ls'.
./ora_475244.aud
./ora_671958.aud
./ora_934052.aud
./ora_934050.aud
However, when I issued the below command:
tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies
5. Linux
Hi,
I'm using the following command to find the multiple requierd file types and its working fine
find . -name "*.pl" -o -name "*.pm" -o -name "*.sql" -o -name "*.so" -o -name "*.sh" -o -name "*.java" -o -name "*.class" -o -name "*.jar" -o -name "*.gz" -o -name "*.Z" -type f
Though... (2 Replies)
Discussion started by: vickramshetty
2 Replies
6. Shell Programming and Scripting
How can I pass $var_find variable as argment to find command?
test.sh
var_find=' \( -name "*.xml" -o -name "*.jsp" \) '
echo "${var_find}"
find . -type f ${var_find} -print
# Below statement works fine.. I want to replace this with the above..
#find . \( -name "*.xml" -o -name... (4 Replies)
Discussion started by: kchinnam
4 Replies
7. Shell Programming and Scripting
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies
8. Shell Programming and Scripting
Hi,
I would like to use find to search for multiple types. For example search for symlink and regular file but not directories, sockets etc.... Something like:
find . -type l,f -name "stuff"
But of course it does not work.
Is there any way to avoid an if statement and to do it faster?
... (0 Replies)
Discussion started by: Dedalus
0 Replies
9. Shell Programming and Scripting
Hi All,
I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd.
What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
Discussion started by: swaters
3 Replies
10. UNIX for Beginners Questions & Answers
I'm looking for a way to inventory files on a webserver into a CSV file, and am particularly interested in certain types of files, like .php, .cgi, .pl, .py, .sh, etc. but also want the ability to find all files, including those with no extension, or specified extensions, as above, including files... (1 Reply)
Discussion started by: spacegoose
1 Replies
LEARN ABOUT PHP
parse_ini_string
PARSE_INI_STRING(3) 1 PARSE_INI_STRING(3)
parse_ini_string - Parse a configuration string
SYNOPSIS
array parse_ini_string (string $ini, [bool $process_sections = false], [int $scanner_mode = INI_SCANNER_NORMAL])
DESCRIPTION
parse_ini_string(3) returns the settings in string $ini in an associative array.
The structure of the ini string is the same as the php.ini's.
PARAMETERS
o $ini
- The contents of the ini file being parsed.
o $process_sections
- By setting the $process_sections parameter to TRUE, you get a multidimensional array, with the section names and settings
included. The default for $process_sections is FALSE
o $scanner_mode
- Can either be INI_SCANNER_NORMAL (default) or INI_SCANNER_RAW. If INI_SCANNER_RAW is supplied, then option values will not be
parsed. As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. In this mode boolean, null and integer types are preserved
when possible. String values "true", "on" and "yes" are converted to TRUE. "false", "off", "no" and "none" are considered FALSE.
"null" is converted to NULL in typed mode. Also, all numeric strings are converted to integer type if it is possible.
RETURN VALUES
The settings are returned as an associative array on success, and FALSE on failure.
NOTES
Note
There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, false, on, off, none.
Values null, off, no and false result in "", and values on, yes and true result in "1", unless INI_SCANNER_TYPED mode is used. Char-
acters ?{}|&~![()^" must not be used anywhere in the key and have a special meaning in the value.
SEE ALSO
parse_ini_file(3).
PHP Documentation Group PARSE_INI_STRING(3)