Sponsored Content
Full Discussion: Grep exif data
Top Forums Shell Programming and Scripting Grep exif data Post 302661577 by Corona688 on Monday 25th of June 2012 11:42:57 AM
Old 06-25-2012
Surely you can modify it into what you're looking for, though, now that you've seen the principles?

Also -- what's your system?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep data from files

Hello Pls help me i need script for counting number of fails from file . The file contains number of failuer records . (2 Replies)
Discussion started by: getdpg
2 Replies

2. Shell Programming and Scripting

Pipe Data From Grep Into A File

I am somewhat of a novice at unix scripting and I need a little help. Here is what im trying to do: I am trying to figure out how to pipe the following grep results into a file. /source/programs: grep "WSBL020" W* WBMB991.cbl: COPY WSBL020. WDCB003.cbl: COPY... (4 Replies)
Discussion started by: katinicsdad
4 Replies

3. Shell Programming and Scripting

grep data and add to file

Hey, i need to write a bash program that can run through a liste of files and then pick up the last access time and modification times and then write them to a file. If anyone has done something like this before, please help me. Thanks (5 Replies)
Discussion started by: nbananda
5 Replies

4. Shell Programming and Scripting

grep required data from two columns

hello, I have output from a command and I need to filter some info out of that. I tried awk command but I can not grep what I am looking for: Following is the output and I need to capture "disabled" for each volume from first column and report: # vol status Volume State ... (2 Replies)
Discussion started by: za_7565
2 Replies

5. Shell Programming and Scripting

i want to grep some data from other file

helo all i have 2 files. and i want to grep the contents of first file from the 2nd file. but these files are too large contaning lacks of lines . i'm using for loop but it takes so moch times . is there any other sol. i'm using this code " for var in `cat succ_migrated` do grep $var... (4 Replies)
Discussion started by: dodasajan
4 Replies

6. Shell Programming and Scripting

Ho can i grep for yestdarday's data in unix

I have the date field in my log file in the format shown below.. (07/23/2009 03:54:02.107)aaaaaa bbbbbb I want to grep for month/date(7/23) field of yestdarday's data. found the below command in this forum which is not working in my SUN Solaris box. date -d "yesterday" +"%d %b %Y" ... (3 Replies)
Discussion started by: rdhanek
3 Replies

7. Shell Programming and Scripting

How can i grep for an hour before data

Hi, My log file is something like this. (08/04/2009 00:27:42.179)(:) aaaaaaaaaaaa (08/04/2009 00:27:42.181)(:) bbbbbbbbbbbbbbbb (08/04/2009 01:00:42.713)(:) cd cdc d ddddsksjdkssksksj (08/04/2009 01:02:42.716)(:) raarrarararararara (08/04/2009 01:07:43.036)(:ERROR) Port... (8 Replies)
Discussion started by: rdhanek
8 Replies

8. UNIX for Dummies Questions & Answers

Advanced grep'in... grep for data next to static element.

I have a directory I need to grep which consists of numbered sub directories. The sub directory names change daily. A file resides in this main directory that shows which sub directories are FULL backups or INCREMENTAL backups. My goal is to grep the directory for the word "full" and then... (2 Replies)
Discussion started by: SysAdm2
2 Replies

9. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

10. Shell Programming and Scripting

Get some data from a list, using grep or sed

Hi, my dear friends, I have to use very frequently the command of qsum to check the free node for job submitting. However, qsum always shows all the nodes regardless of their status. occupied p1 100000mb 48:00:00 1 p72 51200mb -- 1 p73 51200mb -- ... (4 Replies)
Discussion started by: liuzhencc
4 Replies
Kwargs(3pm)						User Contributed Perl Documentation					       Kwargs(3pm)

NAME
Kwargs - Simple, clean handing of named/keyword arguments. VERSION
version 0.01 SYNOPSIS
use Kwargs; # just named my ($foo, $bar, baz) = kw @_, qw(foo bar baz); # positional followed by named my ($pos, $opt_one, $opt_two) = kwn @_, 1, qw(opt_one opt_two) # just a hashref my $opts = kw @_; # positional then hashref my ($one, $two, $opts) = kwn @_, 2; WHY
? Named arguments are good, especially when you take lots of (sometimes optional) arguments. There are two styles of passing named arguments (by convention) in perl though, with and without braces: sub foo { my $args = shift; my $bar = $args->{bar}; } foo({ bar => 'baz' }); sub bar { my %args = @_; my $foo = $args{foo}; } bar(foo => 'baz'); If you want to support both calling styles (because it should be mainly a style issue), then you have to do something like this: sub foo { my $args = ref $_[0] eq 'HASH' ? $_[0] : { @_ }; my $bar = $args->{bar}; } Which is annoying, and not even entirely correct. What if someone wanted to pass in a tied object for their optional arguments? That could work, but what are the right semantics for checking for it? It also gets uglier if you want to unpack your keyword arguments in one line for clarity: sub foo { my ($one, $two, $three) = @{ ref $_[0] eq 'HASH' ? $_[0] : { @_ } }{qw(one two three) }; } Did I say clarity? HAHAHAHAHA! Surely no one would actually put something like that in his code. Except I found myself typing this very thing, and That Is Why. EXPORTS
Two functions (kw and kwn) are exported by default. You can also ask for them individually or rename them to something else. See Sub::Exporter for details. kw(@array, @names) Short for "kwn(@array, 0, @names)" kwn(@array, $number_of_positional_args, @names) Conceptually shifts off n positional arguments from array, then figures out whether the rest of the array is a list of key-value pairs or a single argument (usually, but not necessarily, a hashref). If you passed in any @names, these are used as keys into the hash, and the values at those keys are appended to any positional arguments and returned. If you do not pass @names, you will get a hashref (or whatever the single argument was, like a tied object) back. Note that if the single argument cannot be dereferenced as a hashref, this can die. No attempt is made by this module to handle the exception. AUTHOR
Paul Driver <frodwith@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Paul Driver <frodwith@cpan.org>. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.12.4 2011-01-24 Kwargs(3pm)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy