Sponsored Content
Top Forums Shell Programming and Scripting Grep contents from metastat command Post 302502912 by tuxian on Wednesday 9th of March 2011 08:42:12 AM
Old 03-09-2011
Grep contents from metastat command

Hi,

after issuing metastat command I am getting output as follows

Quote:
d4004: Soft Partition
Device: d4000
State: Okay
Size: 2097152 blocks (1.0 GB)
Extent Start Block Block count
0 18890816 2097152

d4003: Soft Partition
Device: d4000
State: Okay
Size: 4194304 blocks (2.0 GB)
Extent Start Block Block count
0 14696480 4194304

d4025: Soft Partition
Device: d4000
State: Okay
Size: 62914560 blocks (30 GB)
Extent Start Block Block count
0 4210688 10485760
1 142598624 19922944
2 324002528 32505856
Actually these soft partitions are more than 100.

I want output as Device Name & Size.
for eg d4004 2.0 GB
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to strip out the contents of file using grep

Hi, I am receving a file from remote site which has EDI information for 830, 862 and 997 and I want to extect the data for 997 using grep's or any other methods. The data look like this: ISA~000 0000-0001-1000~997 AK1000~m 000~IEA~M ISA~000 0000-0001-1000~849 000~IEA~M ISA~000... (11 Replies)
Discussion started by: isingh786
11 Replies

2. Solaris

Softpartition State: Errored in Command MetaStat

Hi people, I have on problem when execute the command METASTAT... d60: Soft Partition Device: d10 State: Errored Size: 12582912 blocks (6.0 GB) Someone help me? Thank you very much (4 Replies)
Discussion started by: denisgomes
4 Replies

3. Shell Programming and Scripting

Copy subsequent contents of a file from first occurance of grep

There is a file which logs all errors and alerts of the database called alert log. I have a requirement as follows: 1. Check the current date and search for the first occurance of the current date in the alert log. 2. As soon as the first occurance is found, copy the subsequent contents... (5 Replies)
Discussion started by: sunpraveen
5 Replies

4. Shell Programming and Scripting

find file and print only contents with a hit by grep

Hi, can someone help me. I have some files and search a content in this files. If i have a hit I will print a output: filename:content But are more hits in one file: The output is always filename:content E.G. Seach about "three" file1 {one, two, three, four, three} file2... (5 Replies)
Discussion started by: Timmää
5 Replies

5. UNIX for Dummies Questions & Answers

Grep the contents

Hi, Can I get the simple unix command or script to get the output as mentioned below. Input Contents: Processing file: home/j2ee-apps/web-estore/123.txt File: 123.txt Status: Locally Added Processing file: home/j2ee-apps/web-estore/META-INF/application.xml Processing file:... (4 Replies)
Discussion started by: vino_hymi
4 Replies

6. Shell Programming and Scripting

how to grep the contents of a variable..

Hello All, I've written a script to collect all audit logs files; now i want to see only the files from it which contains certain x tablenames. I've stored all the tablenames in a log file and using it through variable in a script (ex:below) $ more tablenames.log (this is just a samle... (2 Replies)
Discussion started by: suri.tyson
2 Replies

7. Shell Programming and Scripting

How to grep the contents inside a tar file

Hi All I have searched the possibility of this options everywhere but am unable to find it in any forum. I have a tar file inside which there are n number of files and i dont know them. I need to grep a word inside the tar file and need to know in which file the word resides. > cat a... (2 Replies)
Discussion started by: Whiteboard
2 Replies

8. Shell Programming and Scripting

Select the exact matching contents using grep

Hi everyone I've two files.. The contents of file1 are as shown below 4 5 12 13 36 37 45 46 47 The contents of file2 are as shown below 21 hello 13 world (5 Replies)
Discussion started by: abk07
5 Replies

9. Solaris

metastat |grep Needs

Dear, Required an script such that : If metastat |grep Needs , results in some output then this command to be executed for the same : opcmsg object=metastat a=OS msg_grp=OpC severity=critical msg_text="Need maintenance for the system $line" With regards, Mjoshi (3 Replies)
Discussion started by: mjoshi87
3 Replies

10. UNIX for Dummies Questions & Answers

Problem to grep contents from a file

hi, I'm trying to grep content from one file in another file. The file that I'm searching into is large and hence I need to temporarily unzip it first. gzip -dc ALL.chr2.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz | grep '169997024\|190670539\|128051369' >... (2 Replies)
Discussion started by: janshamsani
2 Replies
devinfo(1M)						  System Administration Commands					       devinfo(1M)

NAME
devinfo - print device specific information SYNOPSIS
/usr/sbin/devinfo -i device /usr/sbin/devinfo -p device DESCRIPTION
The devinfo command is used to print device specific information about disk devices on standard out. The command can only be used by the superuser. OPTIONS
-i Prints the following device information: o Device name o Software version (not supported and prints as 0) o Drive id number (not supported and prints as 0) o Device blocks per cylinder o Device bytes per block o Number of device partitions with a block size greater than zero -p Prints the following device partition information: o Device name o Device major and minor numbers (in hexadecimal) o Partition start block o Number of blocks allocated to the partition o Partition flag o Partition tag This command is used by various other commands to obtain device specific information for the making of file systems and determining parti- tion information. If the device cannot be opened, an error message is reported. OPERANDS
device Device name. EXIT STATUS
0 Successful operation. 2 Operation failed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
prtvtoc(1M), attributes(5) SunOS 5.11 8 May 1997 devinfo(1M)
All times are GMT -4. The time now is 02:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy