grep is not conditional. It matches lines. It's not a language...
awk is a language, and can do things conditionally. You can even tell it to read the same file twice... On the first pass, save the ID's. On the second pass, fill in missing ones...
Hi,
I want to search files/directories in /temp directory which starts with letter 'a'. How can I do that using grep command.
I can find out like ls -ltr a* but I want to use grep command like ls -ltr | grep ..... like that.
Please help.
Malay (4 Replies)
I'm having problems since few days ago, and i'm not able to make it works with a simple awk+grep script (or other way to do this).
For example, i have a input file1.txt:
cat inputfile1.txt
218299910417
1172051195
1172070231
1172073514
1183135117
1183135118
1183135119
1281440202
... (3 Replies)
Sorry for the title, I really don't know how to word this question or what to even search for. I tried "grep one match", "grep 1 match", "stop grep" on both google and here and haven't found something that helps, so here I go:
I have a file that's about 1.5 million lines long, every line looks... (3 Replies)
Hi guys, I need your help to use advance grep command, In my example below, I have 5 container which has some information on it, and I need to grep specific word "PLMNCode=454F00" which will not only grep the line contains that word, but I need to print the output for the whole container.
Input... (6 Replies)
Could someone please tell me how to search the entire man pages? I know man -k whatever searched the description but I wanna search the entire man page. (8 Replies)
Hi,
I am trying to do pattern search using grep command. But i donot know what mistake i'm doing. I am not getting the expected Result. could any one please help me out?
$ cat b.ksh
AasdjfhB
57834B
86234B
472346B
I want to print the line which is starting with either A or 8 and... (10 Replies)
Hello All,
I was wondering if there is a way to execute a command in my ".bashrc" file based on how I logged into the PC?
I was thinking maybe there is a way to check how the user (*myself) logged in, maybe somehow with the who command along with something else, but I'm not sure... I know I... (7 Replies)
I 'm writing a script to search particular strings from log files. The log file contains lines start with *. The file may contain many other lines start with *. I need to search a particular line from my log file. The grep command is working in command line , but when i run my script, Its printing... (7 Replies)
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
LEARN ABOUT DEBIAN
git::repository::plugin::log
Git::Repository::Plugin::Log(3pm) User Contributed Perl Documentation Git::Repository::Plugin::Log(3pm)NAME
Git::Repository::Plugin::Log - Add a log() method to Git::Repository
SYNOPSIS
# load the plugin
use Git::Repository 'Log';
my $r = Git::Repository->new();
# get all log objects
my @logs = $r->log(qw( --since=yesterday ));
# get an iterator
my $iter = $r->log(qw( --since=yesterday ));
while ( my $log = $iter->next() ) {
...;
}
DESCRIPTION
This module adds a new method to "Git::Repository".
METHOD
log( @args )
Run "git log" with the given arguments.
In scalar context, returns a "Git::Repository::Log::Iterator" object, which can return "Git::Repository::Log" objects on demand.
In list context, returns the full list "Git::Repository::Log" objects. Note that this can be very memory-intensive.
See Git::Repository::Log::Iterator's documentation for details about how parameters are handled.
AUTHOR
Philippe Bruhat (BooK), "<book at cpan.org>"
ACKNOWLEDGEMENTS
Many thanks to Aristotle Pagaltzis who requested a "log()" method in the first place, and for very interesting conversations on the topic.
SEE ALSO
Git::Repository::Plugin, Git::Repository::Log::Iterator, Git::Repository::Log.
COPYRIGHT
Copyright 2010 Philippe Bruhat (BooK).
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-12-28 Git::Repository::Plugin::Log(3pm)