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
inifile(3tcl) Parsing of Windows INI files inifile(3tcl)
__________________________________________________________________________________________________________________________________________________
NAME
inifile - Parsing of Windows INI files
SYNOPSIS
package require Tcl 8.2
package require inifile ?0.2.4?
::ini::open file ?access?
::ini::close ini
::ini::commit ini
::ini::revert ini
::ini::filename ini
::ini::sections ini
::ini::keys ini section
::ini::get ini section
::ini::exists ini section ?key?
::ini::value ini section key ?default?
::ini::set ini section key value
::ini::delete ini section ?key?
::ini::comment ini section ?key? ?text?
::ini::commentchar ?char?
_________________________________________________________________
DESCRIPTION
This package provides an interface for easy manipulation of Windows INI files.
::ini::open file ?access?
Opens an INI file and returns a handle that is used by other commands. access is the same as the first form (non POSIX) of the open
command, with the exception that mode a is not supported. The default mode is r+.
::ini::close ini
Close the specified handle. If any changes were made and not written by commit they are lost.
::ini::commit ini
Writes the file and all changes to disk. The sections are written in arbitrary order. The keys in a section are written in alphabet-
ical order. If the ini was opened in read only mode an error will be thrown.
::ini::revert ini
Rolls all changes made to the inifile object back to the last committed state.
::ini::filename ini
Returns the name of the file the ini object is associated with.
::ini::sections ini
Returns a list of all the names of the existing sections in the file handle specified.
::ini::keys ini section
Returns a list of all they key names in the section and file specified.
::ini::get ini section
Returns a list of key value pairs that exist in the section and file specified.
::ini::exists ini section ?key?
Returns a boolean value indicating the existance of the specified section as a whole or the specified key within that section.
::ini::value ini section key ?default?
Returns the value of the named key and section. If specified, the default value will be returned if the key does not exist. If the
key does not exist and no default is specified an error will be thrown.
::ini::set ini section key value
Sets the value of the key in the specified section. If the section does not exist then a new one is created.
::ini::delete ini section ?key?
Removes the key or the entire section and all its keys. A section is not automatically deleted when it has no remaining keys.
::ini::comment ini section ?key? ?text?
Reads and modifies comments for sections and keys. To write a section comment use an empty string for the key. To remove all com-
ments use an empty string for text. text may consist of a list of lines or one single line. Any embedded newlines in text are prop-
erly handled. Comments may be written to nonexistant sections or keys and will not return an error. Reading a comment from a nonex-
istant section or key will return an empty string.
::ini::commentchar ?char?
Reads and sets the comment character. Lines that begin with this character are treated as comments. When comments are written out
each line is preceded by this character. The default is ;.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category inifile
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
CATEGORY
Text processing
inifile 0.2.4 inifile(3tcl)