10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies
2. Shell Programming and Scripting
Hi Folks,
I have a log file at the following location..
/opt/ert/abc.log
Now abc.log contain the following enteries in this format below..
23-Jul-2014 10:09.32.204 ERROR abc.log cdfrer tyre fgty >>>>> cqno : 78539132 abc Id : 0 Sabc : 20140724
Now in log file (abc.log) I want to... (2 Replies)
Discussion started by: tuntun343466
2 Replies
3. AIX
Hi All,
I am new to AIX unix . i need to grep for a pattern and if pattern is found then i need 3 before the pattern line found and 3 lines after the pattern found. (11 Replies)
Discussion started by: coolvibh
11 Replies
4. Shell Programming and Scripting
Hi All,
I need to recursively grep several folders for a MAC address and display the results with the date of the file name at the start. Even better would be if the final results were displayed chronologically so the newest file is always at the end. Oldest at the top, regardless of what... (8 Replies)
Discussion started by: quemalr
8 Replies
5. Shell Programming and Scripting
Hi All,
I'm trying to grep for 3 patterns in a string of gibberish. It so happens that each line is appended by a date/time stamp and i was able to figure out how to extract only the datetime.
here is the string..
i have to display
tinker tailor soldier spy
Please can some help... (2 Replies)
Discussion started by: Irishboy24
2 Replies
6. Shell Programming and Scripting
I have a list of fields that I want to check a file for, returning that field if it not found at all in the file. Is there a way to do a grep -lc and return the passed variable too rather then just the count?
I am doing some crappy work-around now but I was not sure how to regrep this for :0 so... (3 Replies)
Discussion started by: personalt
3 Replies
7. AIX
I have 2 files: fileA and fileB.
content of fileA
---------------
admin.teacher is in new york;
admin.mason is in new york;
admin.driver is in new york city;
user.trucker is in hartford;
admin.developer is in new york state;
content of fileB
----------------
admin.teacher is in... (8 Replies)
Discussion started by: lowprofile
8 Replies
8. Shell Programming and Scripting
Dear All,
I have a log file that is dislpayed as:
<msg time='2009-10-14T05:46:42.580+00:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='mtdb_a'
host_addr='UNKNOWN' version='1'>
<txt>14-OCT-2009 05:46:42 *... (19 Replies)
Discussion started by: x-plicit78
19 Replies
9. UNIX for Dummies Questions & Answers
give this a try and let me know if it works
grep '^' filename
rachael (2 Replies)
Discussion started by: rachael
2 Replies
10. UNIX for Dummies Questions & Answers
Hi
I was wondering if it's possible to use a command to get the first 3 characters of a line in a text file, I tried grep but it returns the whole line but I am only interested in the first 3 characters. Is this possible with grep or I need any other command?
Also is it possible deleting from... (2 Replies)
Discussion started by: g-e-n-o
2 Replies
STRINGS(1) General Commands Manual STRINGS(1)
NAME
strings - find the printable strings in a object, or other binary, file
SYNOPSIS
strings [ - ] [ -a ] [ -o ] [ -t format ] [ -number ] [ -n number ] [--] [file ...]
DESCRIPTION
Strings looks for ASCII strings in a binary file or standard input. Strings is useful for identifying random object files and many other
things. A string is any sequence of 4 (the default) or more printing characters ending with a newline or a null. Unless the - flag is
given, strings looks in all sections of the object files except the (__TEXT,__text) section. If no files are specified standard input is
read.
The file arguments may be of the form libx.a(foo.o), to request information about only that object file and not the entire library. (Typ-
ically this argument must be quoted, ``libx.a(foo.o)'', to get it past the shell.)
The options to strings(1) are:
-a This option causes strings to look for strings in all sections of the object file (including the (__TEXT,__text) section.
- This option causes strings to look for strings in all bytes of the files (the default for non-object files).
-- This option causes strings to treat all the following arguments as files.
-o Preceded each string by its offset in the file (in decimal).
-t format
Write each string preceded by its byte offset from the start of the file. The format shall be dependent on the single character
used as the format option-argument:
d The offset shall be written in decimal.
o The offset shall be written in octal.
x The offset shall be written in hexadecimal.
-number
The decimal number is used as the minimum string length rather than the default of 4.
-n number
Specify the minimum string length, where the number argument is a positive decimal integer. The default shall be 4.
-arch arch_type
Specifies the architecture, arch_type, of the file for strings(1) to operate on when the file is a universal file. (See arch(3) for
the currently know arch_types.) The arch_type can be "all" to operate on all architectures in the file, which is the default.
SEE ALSO
od(1)
BUGS
The algorithm for identifying strings is extremely primitive.
Apple Computer, Inc. September 11, 2006 STRINGS(1)