extracting desired value from cmd o/p


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting extracting desired value from cmd o/p
# 8  
Old 08-14-2009
small change..
Code:
echo "Maximum volume size: 90406912 (44144Mb)"|sed 's/\(.*\)(\(.*\)Mb)/\2/g'

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Desired Date format

I need to get the current year for the files that has been created today. Ex- when i list in unix console it shows ls -l abc.txt -rw-rw-r-- 1 user1 user1 33 May 2 08:58 abc.txt but i need to get as May 2 2013 , i dont need 08:58 is there any command to list it out in that... (7 Replies)
Discussion started by: Prashanth B
7 Replies

2. UNIX for Dummies Questions & Answers

Help me in getting the desired result

Hi All, I have input file which is pipe delimited A | 1 B | 2 c | 3I need output of displaying total number of lines in a file as last column. A | 1 | 3-----total number of linesin file. B | 2 | 3 c | 3 | 3 (9 Replies)
Discussion started by: pravinashwin
9 Replies

3. Shell Programming and Scripting

Perl open(CMD, "cmd |"); buffering problem..

Hello, There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it? open(CMD,... (2 Replies)
Discussion started by: Shawn, Lee
2 Replies

4. Shell Programming and Scripting

need to get the desired output

Below is the my cide which is working fine but I am not getting the output indesired format.there is some problem in alignment.Can someone help me to correct this? if ]; then summary=$( echo -e "Please review the log file of auto coloclean utility.\n"; echo -e... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

5. Shell Programming and Scripting

Extracting duplicates from a desired field

Hello, I have a file of group names and GID's (/etc/group) and I want to find the duplicate group names and put them in a file. So there are 2 fields, i.e.: audit 10 avahi 70 avahi-autoipd 103 bellrpi 605 bin 1 bin 2 bord 512 busobj 161 bwadm 230 cali81 202 card 323 cardiff 901 cbm... (2 Replies)
Discussion started by: mgb
2 Replies

6. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

7. HP-UX

Desired Format !

Hi everybody, I just need desired ouput from text file which should have folowing format; "2007-06-25 00:03:32.926+05:30",12354369,"Load","Completed","Rs.-5,556.00",9452217714 "2007-06-25 00:06:57.357+05:30",12354371,"Load","Completed","Rs.-56.00",9415766266 "2007-06-25... (1 Reply)
Discussion started by: prasanth_babu
1 Replies

8. Shell Programming and Scripting

Help me in getting the desired output

I wanted to put "|" this sign at starting and at end of every field but its not working with first field like Currently the out put is : abc | abc | abc | xyz | xyz | xyz | But I want the out put in this form: | abc | abc | abc | | xyz | xyz | xyz | plz help me. (2 Replies)
Discussion started by: akash
2 Replies

9. Shell Programming and Scripting

Script not working as desired

Reborg, Sorry to bother you. I have tried the code you suggested and it's not creating new files after they satisfy the criteria. If any of the files don't satisfy the criteria it should not create the files at all. Please see my output below. (39 Replies)
Discussion started by: mhssatya
39 Replies

10. UNIX for Dummies Questions & Answers

man <cmd> >> cmd.txt

I've noticed most of my postings here are because of syntax errors. So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies
Login or Register to Ask a Question
vxcache(1M)															       vxcache(1M)

NAME
vxcache - administer the cache object for space-optimized snapshots SYNOPSIS
vxcache [-g diskgroup] att volume cacheobj vxcache [-g diskgroup] dis cachevol ... vxcache [options] [-g diskgroup] growcacheby cacheobj lengthchange [attribute ...] vxcache [options] [-g diskgroup] growcacheto cacheobj newlength [attribute ...] vxcache [-g diskgroup] listvol cacheobj vxcache [-g diskgroup] set attribute=value cacheobj ... vxcache [options] [-g diskgroup] shrinkcacheby cacheobj lengthchange [attribute ...] vxcache [options] [-g diskgroup] shrinkcacheto cacheobj newlength [attribute ...] vxcache [-g diskgroup] start cacheobj ... vxcache [-g diskgroup] stat [cacheobj ...] vxcache [-f] [-g diskgroup] stop cacheobj... DESCRIPTION
The vxcache utility is used to administer a cache object that is associated with volumes that have one or more space-optimized snapshots. The cache object, cacheobj, and underlying cache volume, cachevol, may be shared between volumes in a disk group. KEYWORDS
att Attaches a volume as a cache volume to a cache object. If a valid cache object exists but the original cache volume has been removed, this operation may be used to attach a new volume as a cache volume to the cache object. dis Dissociates one or more cache volumes from their cache objects. Note: First use the vxcache stop command to stop the cache objects. growcacheby Grows the cache by the specified amount, lengthchange. growcacheto Grows the cache to the specified length, newlength. listvol Prints a space-separated list of space-optimized instant snapshots that have been created on the specified cache object. This list is sorted by the timestamp on the snapshot. If two or more snapshots have the same timestamp, these snapshots are sorted in order of decreasing size. set Sets the value of an attribute for the specified cache objects. Values may be set for the autogrow, autogrowby, highwatermark and maxautogrow attributes. See the vxcached(1M) manual page for a description of these attributes. shrinkcacheby Shrinks the cache by the specified amount, lengthchange. shrinkcacheto Shrinks the cache to the specified length, newlength. start Starts cache objects and rebuilds the in-core mapping. stat Prints space usage statistics for cache objects: TOTAL Total size of the cache volume in megabytes that is available to cache data. As a small amount of space is required to hold cache object metadata, this value is always smaller than the total size of the cache volume. USED Size of the cache that is in use in megabytes and as a percentage. AVAIL Size of the cache that is available for use in megabytes and as a percentage. SDCNT Number of subdisks that have been created on the cache object. If no cache objects are specified, statistics are displayed for all cache objects in the disk group. stop Stops cache objects. OPTIONS
Note: The -d and -n options apply only to the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto operations. -d defaults Specifies a file containing defaults for various attributes related to space allocation for growing and shrinking the cache. If not specified, this defaults to /etc/default/vxassist. -f Forces the stop operation if any snapshots have been created on a cache object. -g diskgroup Specifies the disk group for the operation, either by disk group ID or by disk group name. If this option is not specified, the default disk group is determined using the rules given in the vxdg(1M) manual page. -n Prevents the system defaults file being read. Hardware-Specific Options Note: These options apply only to the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto operations. Some environments provide guidelines to optimize VxVM's interaction with intelligent storage systems. If these guidelines are present, VxVM follows them when allocating space for volumes. The following options change the behavior of the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto operations: -o override Performs the specified vxcache task for the specified volume and ignores any storage-specific guidelines. Overriding the guide- lines is not recommended as it can result in incompatible objects, or objects that cannot be administered by VxVM and any associ- ated software that exploit storage-specific features. -o verify Verifies that the vxcache task for the specified volume can be performed without violating any storage-specific guidelines, but does not commit or perform any task. If any guidelines are violated, vxcache exits with an error message. Note: These options need a separate license. Without the license, vxcache ignores the specified option. Refer to the vendor-specific documentation for more information on how intelligent storage systems can interact with VxVM. EXAMPLES
Create and enable a 1GB mirrored cache with a region size of 32KB: vxassist -g mydg make cachevol 1g layout=mirror init=active mydg16 mydg17 vxmake -g mydg cache cobjmydg cachevolname=cachevol regionsize=32k vxcache -g mydg start cobjmydg Grow the cache volume, mydgcvol, that is associated with the cache object, mydgcobj, by 1GB: vxcache -g mydg growcacheby mydgcobj 1g Change the value of the maxautogrow attribute to 2GB for a cache: vxcache -g mydg set maxautogrow=2g mydgcobj Stop and restart the cache object, mydgcobj, which has entered the DETACHED state after a failed grow or shrink operation (the -f option to vxcache stop is required because snapshots exist on the cache object): vxcache -f -g mydg stop mydgcobj vxcache -g mydg start mydgcobj Stop the cache object, mydgcobj, and dissociate the cache volume, mydgcvol, from it: vxcache -g mydg stop mydgcobj vxcache -g mydg dis mydgcvol NOTES
The attributes that may be specified with the growcacheby, growcacheto, shrinkcacheby and shrinkcacheto keywords are the same as for the vxassist command. See the vxassist(1M) manual page for details. The vxcached daemon monitors the usage of cache objects. See the vxcached(1M) manual page for details. The minimum size of a cache volume is approximately 10m(10MB) plus 1MB for each 256KB of the region size. SEE ALSO
vxassist(1M), vxcached(1M), vxintro(1M), vxmake(1M), vxsnap(1M), vxstat(1M) VxVM 5.0.31.1 24 Mar 2008 vxcache(1M)