Sponsored Content
Full Discussion: Grepping issue..
Top Forums Shell Programming and Scripting Grepping issue.. Post 302171155 by LinuxRacr on Wednesday 27th of February 2008 04:59:37 PM
Old 02-27-2008
Quote:
Originally Posted by joeyg
Rather than my trying to re-create your scenario, you are determining the number of each disk size from "vxdisk_avail_$SIZE.txt".
Can you post this file from your run? My thinking is to do something with a cut based on -d":" and then a numeric comparison.
But, I cannot work through all of the logic in my head.

Here is the output from both files:

vxdisk_avail_5242880.txt

Code:
root@server:/root_home> more vxdisk_avail_5242880.txt
/dev/rdsk/c10t2d1  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :5242880  :1024 :      :            :
/dev/rdsk/c10t2d2  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :5242880  :1024 :      :            :
/dev/rdsk/c10t2d3  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :5242880  :1024 :      :            :

vxdisk_avail_524288000.txt

Code:
root@server:/root_home> more vxdisk_avail_524288000.txt
/dev/rdsk/c10t0d6  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t0d7  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d0  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d1  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d2  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d3  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d4  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d5  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d6  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t1d7  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :
/dev/rdsk/c10t2d0  :5849ARF0 :COMPAQ  :HSV111 (C):      :     :    :   :    :    :524288000:1024 :      :            :

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grepping

Is there a way to grep for something and then print out 10 lines after it. for example if I want to grep for a word, then output the following 10 or whatever number of lines after the word. (5 Replies)
Discussion started by: eloquent99
5 Replies

2. UNIX for Dummies Questions & Answers

grepping for a sentence

Can you grep for a sentence. I have to search logs everyday at work and I was wondering if I could search for a string of words instead of just one. for example, if I had to find this sentence: "Received HTTP message type" How would I grep it (2 Replies)
Discussion started by: eloquent99
2 Replies

3. Shell Programming and Scripting

grepping around

Using shell scripts, I use grep to find the word “error” in a log file: grep error this.log. How can I print or get the line 3 lines below the line that word “error” is located? Thanks in advance for your response. (9 Replies)
Discussion started by: cbeauty
9 Replies

4. Shell Programming and Scripting

Please help on grepping

Hi All, I have a log file and I want to parse the logfile with a script.A sample text is shown below: I would grep on "return code " on this file. Any idea how the lines above and below the grep patterns could also be extracted. Thanks! nua7 The runLoggingInstall return code is 0... (3 Replies)
Discussion started by: nua7
3 Replies

5. UNIX for Dummies Questions & Answers

Help with grepping within variables

I've got a script at the moment that looks like this: if then echo "How many hours would you like users to have logged in for? (single digits)" read hours tim= echo "These are the users who were logged in for $hours... (1 Reply)
Discussion started by: chris_rabz
1 Replies

6. UNIX for Dummies Questions & Answers

grepping a variable

I need to pass a parameter that will then be grepped. I need it to grep /paramater and then have a space so if 123 was passed my grep would be grep '/123 ' sample.log this works fine from the command line but when i try and set it searchThis="/$2 " and then run grep $searchThis... (6 Replies)
Discussion started by: magnia
6 Replies

7. Shell Programming and Scripting

grepping by digit

Hi all, Need your help here. I have a file with thousand of lines, as shown in example below KDKJAA 98324 OIDSAJ 324 KJAJAK 100 KJKAJK 89 JOIJOI 21 JDKDJL 12 UOIUOD 10 UDUYDS 8 UIUHKK 6 I would like to grep using... (5 Replies)
Discussion started by: masterpiece
5 Replies

8. UNIX for Dummies Questions & Answers

Grepping using -w and dashes (-)

I have a script to sort a list of arbitrary hosts and determine if they are supported by grepping them into a master supported list. I cut all the suffixes of the hosts in the arbitrary list, leaving the "short" hostname if you will, then grep -w them into the master list. For example: ... (1 Reply)
Discussion started by: MaindotC
1 Replies

9. Shell Programming and Scripting

Grepping more than one word

Dear Experts, Need your help. Typically we use "grep" to search and display a pattern in a txt file. However, here what we want is, we want to grep a line which contains 4 words any where in a line. For example. File has 10,000,000 lines in it out of which there is a particular line which... (1 Reply)
Discussion started by: anushree.a
1 Replies

10. Shell Programming and Scripting

Performance issue in Grepping large files

I have around 300 files(*.rdf,*.fmb,*.pll,*.ctl,*.sh,*.sql,*.prog) which are of large size. Around 8000 keywords(which will be in the file $keywordfile) needed to be searched inside those files. If a keyword is found in a file..I have to insert the filename,extension,catagoery,keyword,occurrence... (8 Replies)
Discussion started by: millan
8 Replies
volrmmount(1)							   User Commands						     volrmmount(1)

NAME
volrmmount - call rmmount to mount or unmount media SYNOPSIS
volrmmount [-i | -e] [name | nickname] volrmmount [-d] DESCRIPTION
The volrmmount utility calls rmmount(1M) to, in effect, simulate an insertion (-i) or an ejection (-e). Simulating an insertion often means that rmmount will mount the media. Conversely, simulating an ejection often means that rmmount will unmount the media. However, these actions can vary depending on the rmmount configuration and media type (see rmmount.conf(4)). For example, if you use the default /etc/rmmount.conf and insert a music CD, it will not be mounted. However, you can configure rmmount so that it calls workman whenever a music CD is inserted. This command allows you to override Volume Management's usual handling of media (see EXAMPLES below). OPTIONS
The following options are supported: -i Simulates an insertion of the specified media by calling rmmount. -e Simulates an ejection of the specified media by calling rmmount. -d Displays the name of the default device for volrmmount to handle. This device is used if no name or nickname is supplied. OPERANDS
The following operands are supported: name The name that Volume Management recognizes as the device's name. See volfs(7FS). nickname A shortened version of the device's name. Following is the list of recognized nicknames: +-----------------------------+-----------------------------+ | Nickname | Path | +-----------------------------+-----------------------------+ |fd |/dev/rdiskette | +-----------------------------+-----------------------------+ |fd0 |/dev/rdiskette | +-----------------------------+-----------------------------+ |fd1 |/dev/rdiskette1 | +-----------------------------+-----------------------------+ |diskette |/dev/rdiskette | +-----------------------------+-----------------------------+ |diskette0 |/dev/rdiskette0 | +-----------------------------+-----------------------------+ |diskette1 |/dev/rdiskette1 | +-----------------------------+-----------------------------+ |rdiskette |/dev/rdiskette | +-----------------------------+-----------------------------+ |rdiskette0 |/dev/rdiskette0 | +-----------------------------+-----------------------------+ |rdiskette1 |/dev/rdiskette1 | +-----------------------------+-----------------------------+ |floppy |/dev/rdiskette | +-----------------------------+-----------------------------+ |floppy0 |/dev/rdiskette0 | +-----------------------------+-----------------------------+ |floppy1 |/dev/rdiskette1 | +-----------------------------+-----------------------------+ |cdrom0 |/vol/dev/rdsk/cXtYdZ/label | +-----------------------------+-----------------------------+ |zip0 |/vol/dev/rdsk/cXtYdZ/label | +-----------------------------+-----------------------------+ |jaz0 |/vol/dev/rdsk/cXtYdZ/label | +-----------------------------+-----------------------------+ |rmdisk0 |/vol/dev/rdsk/cXtYdZ/label | +-----------------------------+-----------------------------+ EXAMPLES
Example 1: Using the volrmmount command When Volume Management finds a floppy that contains a filesystem, it calls rmmount to mount it. If you wish to run tar(1) or cpio(1) on that floppy, it must first be unmounted. To unmount the floppy use: example% volrmmount -e floppy0 After volrmmount unmounts the floppy, if you wish to re-mount it (rather than ejecting it and reinserting it) use: example% volrmmount -i floppy0 Notice that if you are using a named floppy, you can use its name in place of floppy0. FILES
/dev/volctl Volume Management control port ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWvolu | +-----------------------------+-----------------------------+ SEE ALSO
cpio(1), eject(1), tar(1), rmmount(1M), vold(1M), rmmount.conf(4), attributes(5), volfs(7FS) NOTES
Volume Management (vold) must be running to use this command. SunOS 5.10 30 Aug 2000 volrmmount(1)
All times are GMT -4. The time now is 05:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy