08-05-2010
That easy huh? Thanks!
Out of interest, if I wanted to get it to search for multiple strings, what would be the best way of doing that? In other words to return 0 if nothing is found, but 1 if any of the strings are located in the tail-ed output.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All
I had below mention file as my input file.
87980457 Jan 12 2008 2:00AM 1 60 BSC1
81164713 Jan 12 2008 3:00AM 1 60 BSC2
78084521 Jan 12 2008 4:00AM 1 60 BSC3
68385193... (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies
2. UNIX for Dummies Questions & Answers
What Im basically trying to do is this:
I have a small script that can grep any parameter entered into a search string, then print to the screen the name of each file the parameter appears in as well as the file path, ie the directory.
The code Im using just for this is....
Directory... (3 Replies)
Discussion started by: Eddeh
3 Replies
3. Shell Programming and Scripting
I have looked at almost every posting on here regarding, grep, sed, awk, nawk, perl methods to perform this function, but they are just not returning the results I hope to see.
Example File:
abcdef
123456
ghijkl
7890123
7890123
7890123
7890123
mnopqrs
456789
This is the most... (4 Replies)
Discussion started by: doza22
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a file with the following contents:
COMPANY ABCD
TRUCKER JOE SMITH
TRUCK 456
PLATE A12345678
TRUCKER BILL JONES
TRUCK 789
PLATE B7894561
I need to create a script or search command that will search for this string '789' in the file. This string is unique and only... (7 Replies)
Discussion started by: doza22
7 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a file with the following contents:
I need to create a script or search command that will search for this string 'ENDC' in the file. This string is unique and only occurs in one record. Once it finds the string, I would like it to return positions 101-109 ( this is the date of... (0 Replies)
Discussion started by: Lenora2009
0 Replies
6. Shell Programming and Scripting
Folks ,
I have a korn shell script that i have written for assembly, the variable that is a final result is returning hexadecimal, now the value is to be converted to binary and return the place holder in the binary that has a 1 in its place and send it to a variable assigned for the... (0 Replies)
Discussion started by: venu
0 Replies
7. Shell Programming and Scripting
Hi,
I'm trying to search a text file for a string: "energy(sigma->0)=". To do so, I executed the grep command, which returned many matches, for example:
energy without entropy = -112.16486170 energy(sigma->0) = -112.16520778
energy without entropy = -112.16488936 ... (5 Replies)
Discussion started by: gwr
5 Replies
8. Shell Programming and Scripting
Hello all,
after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help.
I need to resolve a grep / sed / xargs / awk problem.
My input file is just like this:
----------------------------------... (6 Replies)
Discussion started by: bash4ever
6 Replies
9. Shell Programming and Scripting
Hi,
I need a shell script, which would search the result values from another files.
1)execute " select column1 from table_name" query on the table.
2)Based on the result, need to be grep from .wft files.
could please explain about this.Below is the way i am using.
#!/bin/sh... (4 Replies)
Discussion started by: Rami Reddy
4 Replies
10. Programming
Hi,
I am not a C programmer. The only C exposure I have is reading and completing the exercises from the C (ANSI C ) Programming Language book:o
At the moment, I am using the UNIX strings command to extract information for a binary file and grepping for a particular string and the value... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT DEBIAN
log::agent::message
Agent::Message(3pm) User Contributed Perl Documentation Agent::Message(3pm)
NAME
Log::Agent::Message - a log message
SYNOPSIS
require Log::Agent::Message;
my $msg = Log::Agent::Message->make("string");
$msg->prepend("string");
$msg->append("string");
my $copy = $msg->clone;
print "Message is $msg
"; # overloaded stringification
DESCRIPTION
The Log::Agent::Message class represents an original log message (a string) to which one may prepend or append other strings, but with the
special property that prepended strings aggregate themselves in FIFO order, whilst appended strings aggregate themselves in LIFO order,
which is counter-intuitive at first sight.
In plain words, this means that the last routine that prepends something to the message will get its prepended string right next to the
original string, regardless of what could have been prepended already. The behaviour is symetric for appending.
INTERFACE
The following routines are available:
append($str)
Append suppled string $str to the original string (given at creation time), at the head of all existing appended strings.
append_last($str)
Append suppled string $str to the original string (given at creation time), at the tail of all existing appended strings.
clone
Clone the message. This is not a shallow clone, because the list of prepended and appended strings is recreated. However it is not a
deep clone, because the items held in those lists are merely copied (this would matter only when other objects with overloaded
stringification routines were supplied to prepend() and append(), which is not the case today in the basic Log::Agent framework).
make($string)
This is the creation routine.
prepend($str)
Prepend supplied string $str to the original string (given at creation time), at the tail of all existing prepended strings.
prepend_first($str)
Prepend supplied string $str to the original string (given at creation time), at the head of all existing prepended strings.
stringify
This is the overloaded "" operator, which returns the complete string composed of all the prepended strings, the original string, and
all the appended strings.
AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com>
SEE ALSO
Log::Agent(3).
perl v5.10.0 2002-03-09 Agent::Message(3pm)