Sponsored Content
Full Discussion: Recursive find and store
Top Forums Shell Programming and Scripting Recursive find and store Post 302292687 by cfajohnson on Sunday 1st of March 2009 10:38:30 AM
Old 03-01-2009
Quote:
Originally Posted by ultimatix
wrote on caps lock for calrity to all forum members ...

For future reference, please note that all caps is harder to read than lower case.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Performing a non-recursive find in Unix

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

Question: non-recursive find syntax

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

making a recursive find more useful..

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

Non recursive find command

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

Not able to store the results of perl recursive function when applied under for loop

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

Recursive directory search using ls instead of find

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

Some advice please on non-recursive find

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

Non Recursive Find Command

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

Recursive Find on file size

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

Help needed - find command for recursive search

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
Struct(3)						User Contributed Perl Documentation						 Struct(3)

NAME
Inline::Struct -- Manipulate C structures directly from Perl. SYNOPSIS
use Inline C => Config => Structs => ['Foo']; my $obj = Inline::Struct::Foo->new; $obj->num(10); $obj->str("Hello"); myfunc($obj); __END__ __C__ struct Foo { int num; char *str; }; void myfunc(Foo *f) { printf("myfunc: num=%i, str='%s' ", f->num, f->str); } This complete program prints: myfunc: num=10, str='Hello' DESCRIPTION
Inline::Struct is not a new language. It's a language extension designed to be used by Inline::C. It parses struct definitions and creates typemaps and XS code which bind each struct into a Perl class. This code is passed to Inline::C, which compiles it in the normal way. NOTE: Inline::Struct parses only C-style structs. It doesn't know about any C++ extensions to structs like scopes, constructors or methods. If you want such functionality you should use Inline::CPP to parse your structs. Using Inline::Struct Inline::Struct has a Parse::RecDescent grammar to parse C structs. If a struct is recognized, it can be bound to Perl. If the struct's definition is not recognized (usually because it has a member with no typemap), it will not be bound to Perl, but will be available from other functions in C or C++. The following example shows how a simple struct might look to a Perl programmer. Example 1: use Inline C => <<'END', ENABLE => 'STRUCTS'; struct Fraction { long numer; long denom; }; END my $o = Inline::Struct::Fraction->new(4, 3); print $o->numer, $o->denom, " "; $o->numer(4)->denom(7); After the code above has been compiled, Perl's namespace looks a lot like the following: package Inline::Struct::Fraction; sub new { } sub DESTROY { } sub _KEYS { } sub _VALUES { } sub _HASH { } sub numer { } sub denom { } Note that these are actually XS subs written in C, not Perl subs. But that's what it looks like. The Struct Interface The following sections define the interface of each subroutine. Note: this interface is likely to change in future versions of Inline::Struct. Please don't rely on Inline::Struct in production code quite yet. When a struct is bound by Inline::Struct, a new namespace is created underneath Inline::Struct. So if you have a struct named 'Foo', the package of the Perl class will be 'Inline::Struct::Foo'. new If no arguments are provided, all fields are zeroed out. If you provide values, they should be appropriate for the field type, and in the same order as they are defined in the struct. DESTROY The destructor. Should never be called by the programmer -- this is called automatically when the Perl variable holding the struct is destroyed. Frees the memory associated with the struct. If the struct holds pointers to malloc'd memory, they will not be freed. If you run into such a situation, consider using C++ and Inline::CPP instead. _KEYS A read-only method, this returns a reference to an array containing the names of the fields in the struct. The fields are in the order they appear in the C source code. _VALUES A read-only method, this returns a reference to an array containing the values of the fields in the struct. The values are returned in the same order as the fields. _HASH A read-only method, this returns a reference to a hash, mapping field names to field values. Accessors For each field in the struct, an accessor sub will be created which lets you get or set the value in the struct. If no arguments are provided, the sub returns the value of that field. If any arguments are provided, the field is set to the first argument, and the modified structure is returned. This makes setting multiple fields easy: $o->field1(something)->field2(somethingelse); C and C++ Configuration Options Inline::Struct has no configuration options of its own, but it does provide a new configuration option for C or C++. STRUCTS Specifies that structs are to be bound to Perl. There are several meanings to this option, so I'll explain with an example: use Inline C => Config => STRUCTS => 'Foo'; Adds 'Foo' to the list of structs to bind to Perl. use Inline C => Config => STRUCTS => ['Foo', 'Bar']; Adds 'Foo' and 'Bar' to the list of structs to bind to Perl. use Inline C => Config => STRUCTS => undef; Clears the list of structs to bind to Perl. use Inline C => Config => ENABLE => 'STRUCTS'; or use Inline C => Config => STRUCTS => 1; Enable binding structs to Perl, without specifying any structs to search for. As shown, this would bind all structs to Perl. use Inline C => Config => DISABLE => 'STRUCTS'; or use Inline C => Config => STRUCTS => 0; Disable binding structs to Perl. SEE ALSO
For more information about using C from Perl, see Inline::C. For more information about using C++ from Perl, see Inline::CPP. AUTHOR
Neil Watkiss (NEILW@cpan.org) COPYRIGHT
Copyright (C) 2001, Neil Watkiss. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. (see http://www.perl.com/perl/misc/Artistic.html) perl v5.16.2 2001-05-13 Struct(3)
All times are GMT -4. The time now is 11:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy