get some information from a text string


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting get some information from a text string
# 1  
Old 03-30-2011
get some information from a text string

deleted

Last edited by roybean; 04-01-2011 at 07:13 AM.. Reason: code tags
# 2  
Old 03-30-2011
Perhaps you could just save the last report, and if the new report is different, mail it and make it the last report.
Code:
 
if [ "$(cmp file1 file2 2>&1)" != "" ]

It is a lot easier than parsing the report and extracting a status from the position of each line.
This User Gave Thanks to DGPickett For This Post:
# 3  
Old 03-30-2011
But what i need is the disk bay and the failure information
# 4  
Old 04-01-2011
deleted
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

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

2. UNIX for Dummies Questions & Answers

Obtaining File information based on String Search

Is there a single Command in Unix to get the following Information when searching for files containing one or more strings in a Unix Directory (including sub directories within it) : 1) Complete filename ( path and filename) 2) Owner of the file 3) Size of the file 4) Last Modified date... (3 Replies)
Discussion started by: pchegoor
3 Replies

3. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

4. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

5. Shell Programming and Scripting

get specific information from text file or command output

Hello, I would need some help, :wall: on a linux script, I am not sure how can I separate some text file, Text file contains something similar to this: share "userhome_e" "/fs1_100g/FILE58/userhome" umask=022 maxusr=4294967295 netbios=FILE58 share "bu share"... (3 Replies)
Discussion started by: nakaedu
3 Replies

6. Shell Programming and Scripting

Split string with blancs to pick up information in a file ?

Hello, I am quite new in shell, and would like to pick up information in a file. The file structure is like this faor all data: T 50 2 2.5 is this a candy number color price I know how to pick up a line. I do this: head -linenumber candyfile.doc | tail -1 But I would... (6 Replies)
Discussion started by: shadok
6 Replies

7. Shell Programming and Scripting

Trying to Parse Version Information from Text File

I have a file name version.properties with the following data: major.version=14 minor.version=234 I'm trying to write a grep expression to only put "14" to stdout. The following is not working. grep "major.version=(+)" version.properties What am I doing wrong? (6 Replies)
Discussion started by: obfunkhouser
6 Replies

8. Shell Programming and Scripting

Retreiving information from a text file

Hey guys, i just started shell programming and i have a question. I am working on a simple inventory project and one of the problems which i am unable to solve would be how i am going to extract the data i need from a text file(which will be my database) and then put it inside the executable to be... (5 Replies)
Discussion started by: gregarion
5 Replies

9. Shell Programming and Scripting

Extracting information from Config files /text processing

Hello All, This is my first post on this forums, which I consider one of the best of its kind. The reason for my post is that I want to export some information form Nagios configuration files to a DB. I know that there are other tools available to do this, like NDO, monarch, etc... But I want to... (3 Replies)
Discussion started by: oconmx
3 Replies

10. UNIX for Dummies Questions & Answers

Extracting information from text fields.

Dear friends, I'm a novice Unix user and I'm trying to learn the ropes. I have a big task I have to accomplish and I'm convinced Unix can get the job done, I just haven't figured out how. I recently posted on the topic of cutting text between unique text patterns and somebody helped me a great... (24 Replies)
Discussion started by: spindoctor
24 Replies
Login or Register to Ask a Question