02-28-2009
Recursive find and store
I HAVE A TEXT FILE CONTAINING THE VALUES
1.CPP
2.CPP
3.CPP
4.CPP
5.CPP
6.CPP
I WANT TO TAKE EACH .CPP AND USE THE FIND COMMAND TO FIND THE LATEST VERSION OF THE FOLDER IN WHICH IT IS PRESENT.
HOW DO I IMPLEMENT IT IN A WHILE LOOP
I TRIED SOMETHING LIKE THIS
WHILE
CAT FILENAME |
READ LINE .....
BUT I AM UNABLE TO PASS THE VALUE OF CLASSNAME IN FIND COMMAND.
FIND . -NAME CLASSNAME |SORT
PLEASE HELP
SECONDLY
I have a text file containing values as
./V02345CS/1.CPP
./V02340CS/2.CPP
./V02349CS/3.CPP
./V02348CS/4.CPP
./V02347CS/5.CPP
./V02346CS/6.CPP
FIRST I WANT TO SEPARTELY STORE THE VALUES V02346CS (FOLDER NAME) AND 6.CPP (CLASS NAME) IN A VARIABLE AND UPDATE A ORACLE DATABASE TABLE.
ANY SUGGESTIONS APPRECIATED
REGARDS
---ULTIMATIX...
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I need to perform a non-recursive find in Unix. Sounds simple, but it doesn't actually work. The command ALWAYS searches through the subdirectories.
Any ideas? I am on DEC Unix :-( (3 Replies)
Discussion started by: christallott
3 Replies
2. UNIX for Dummies Questions & Answers
Hello, I am trying to search a directory for all files matching "G*" without looking in sub-directories "success" and "error". I've searched this forum and found the following syntax, but can't make it work:
find . \( ! -name success -prune -name error -prune \) -type f -name "G*"
Have... (6 Replies)
Discussion started by: alexkav
6 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone,
I'm using a recursive find (you know the type, find . -name qwert*) to find a set of files. However, because I'm new to the system and there is not much documentation about these particular files I'm trying to find them using this recursive find.
I started off at the location... (3 Replies)
Discussion started by: spanish_tony
3 Replies
4. UNIX for Advanced & Expert Users
Hi,
I have question is related to find command. I want to find command should search in current folder only not recursive mode(sub-folders).
I found a one way of,
find . \( -name success -prune \) -o -name "Rajini*"
How ever, my current folder is having lots sub-folders and am not... (7 Replies)
Discussion started by: Nagapandi
7 Replies
5. Shell Programming and Scripting
Hi Perl Gurus , need URGENT HELP PLEASE !!!!!
I have one recursive Perl function which takes path of any directory as argument and returns array containing all the sub folders inside it recursively.
Now the problem is that it works well if i use it with one time but the problem is that when... (0 Replies)
Discussion started by: anthriksh2000
0 Replies
6. UNIX for Advanced & Expert Users
I was working on a shell script and found that the find command took too long, especially when I had to execute it multiple times. After some thought and research I came up with two functions.
fileScan()
filescan will cd into a directory and perform any operations you would like from within... (8 Replies)
Discussion started by: newreverie
8 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I am currently writing a find-and-remove kind of script that is to be used for Solaris and Linux.
Currently am using the find command below that I is in find only current directory (universal) | commandlinefu.com
This however gives me the "ksh: /bin/find: arg list too long" error... (6 Replies)
Discussion started by: newbie_01
6 Replies
8. UNIX for Dummies Questions & Answers
Hello Unix Gurus,
I am using the following find commands:
1)
find Input_Path -name '*.' -exec mv -f
{} Outputpath \;
2)
find Inputpath -name '*.' -exec cp
{} Outputpath \;
3)
find Somepath -name '*.'
Now the problem is my Unix version does not support maxdepth Option for find... (7 Replies)
Discussion started by: pchegoor
7 Replies
9. UNIX for Dummies Questions & Answers
Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only?
Thanks in advance. (6 Replies)
Discussion started by: jimbojames
6 Replies
10. UNIX for Dummies Questions & Answers
Hi All
I have a requirement to find the file that are most latest to be modified in each directory. Can somebody help with the command please?
E.g of the problem.
The directory A is having sub directory which are having subdirectory an so on.
I need a command which will find the... (2 Replies)
Discussion started by: sudeep.id
2 Replies
LEARN ABOUT DEBIAN
gtk2hsc2hs
GTK2HSC2HS(1) C->Haskell GTK2HSC2HS(1)
NAME
gtk2hsC2hs - C->Haskell Interface Generator
SYNOPSIS
gtk2hsC2hs [OPTIONS]... [ header-file ] binding-file
DESCRIPTION
This manual page briefly describes the gtk2hsC2hs command. It's a modified version of the c2hs(1) command, which is a helper program nec-
essary to build the Gtk2Hs suite of libraries.
OPTIONS
The programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options are included
below. For a complete description, see the other documentation.
gtk2hsC2hs accepts the following options:
-h, -?, --help
brief help
-v, --version
show version information
-c CPP, --cpp=CPP
use executable CPP to invoke C preprocessor
-C CPPOPTS, --cppopts=CPPOPTS
pass CPPOPTS to the C preprocessor
-o FILE, --output=FILE
output result to FILE (should end in .hs)
-t PATH, --output-dir=PATH
place generated files in PATH
-p PLATFORM, --platform=PLATFORM
platform to use for cross compilation
-k, --keep
keep pre-processed C header
-l NAME, --lock=NAME
wrap each foreign call with the function NAME
-d TYPE, --dump=TYPE
dump internal information (for debugging), where TYPE is one of:
o trace trace compiler phases
o genbind trace binding generation
o ctrav trace C declaration traversal
o chs dump the binding file (adds .dump to the name)
header-file is the header file belonging to the marshalled library. It must end with suffix .h.
binding-file is the corresponding Haskell binding file, which must end with suffix .chs.
PLATFORM The platform name can be one of: x86_64-linux. i686-linux. m68k-palmos. This allows for cross-compilation, assuming the rest of
your toolchain supports that. The default is the current host platform.
The most useful of these options is probably --cppopts (or -C). If the C header file needs any special options (like -D or -I) to go
through the C pre-processor, here is the place to pass them.
EXAMPLES
When used directly, gtk2hsC2hs is usually called as:
gtk2hsC2hs lib.h Lib.chs
where lib.h is the header file and Lib.chs the Haskell binding module, which define the C- and Haskell-side interface, respectively. If no
errors occur, the result is a pure Haskell module Lib.hs, which implements the Haskell API of the library.
A more advanced call may look like this:
gtk2hsC2hs --cppopts=-I/some/obscure/dir --cppopts=-DEXTRA lib.h Lib.chs
Often, lib.h will not be in the current directory, but in one of the header file directories. Apart from the current directory, C->Haskell
looks in two places for the header: first, in the standard include directory of the used system, this is usually /usr/include and
/usr/local/include; and second, it will look in every directory that is mentioned in a -IDIR option passed to the pre-processor via
--cppopts.
CAVEATS
If you have more than one option that you want to give to the pre-processor, use multiple --cppopts= flags.
BUGS
Please report bugs and feature requests in the Gtk2Hs trac
http://hackage.haskell.org/trac/gtk2hs/
or to the Gtk2Hs mailing list gtk2hs-devel@lists.sourceforge.net
COPYRIGHT
C->Haskell Compiler, version 0.13.4 (gtk2hs branch) Copyright (c) [1999..2004] Manuel M T Chakravarty <chak@cse.unsw.edu.au>
AUTHOR
This page was addapted from the c2hs(1) manpage, by Marco Tulio Gontijo e Silva <marcot@debian.org> for the Debian GNU/Linux system (but
may be used by others), which was mainly assembled from the original documentation of c2hs.
The c2hs(1) was written by Michael Weber <michael.weber@post.rwth-aachen.de> for the Debian GNU/Linux system (but may be used by others).
Version 0.13.4 (gtk2hs branch) November 2004 GTK2HSC2HS(1)