Sponsored Content
Top Forums Shell Programming and Scripting extracting desired value from cmd o/p Post 302343921 by vidyadhar85 on Friday 14th of August 2009 06:10:53 AM
Old 08-14-2009
no need of such complex sed for this..
Code:
echo "Maximum volume size: 90406912 (44144Mb)"|awk -F"[(Mb)]" '{print $3}'

 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
vxresize(1M)															      vxresize(1M)

NAME
vxresize - change the length of a volume containing a file system SYNOPSIS
/etc/vx/bin/vxresize [-bfnsx] [-F fstype] [-g diskgroup] [-o {override|verify}] [-t tasktag] volume new_length [[!]medianame...] [specification_arguments] DESCRIPTION
The vxresize command either grows or shrinks both the file system and its underlying volume to match the specified new volume length. The ability to grow or shrink is file system dependent. Some file system types may require that the file system be unmounted for the operation to succeed, as shown in the following table: ______________________________________________________________ | | Online JFS | Base JFS | HFS | | | (Full-VxFS) | (Lite-VxFS) | | |______________|_______________|_______________|_______________| | Mounted FS |Grow and shrink| Not allowed | Not allowed | | | (uses fsadm) | | | |______________|_______________|_______________|_______________| | Unmounted FS | Grow only | Grow only | Grow only | | |(uses extendfs)|(uses extendfs)|(uses extendfs)| |______________|_______________|_______________|_______________| Note: o vxresize works with JFS (derived from Veritas File System (VxFS)) and HFS file systems only. o In some situations, when resizing large volumes, vxresize may take a long time to complete. o Resizing a volume with a usage type other than FSGEN or RAID5 can result in loss of data. Use the -f option to force resizing of such a volume. o You cannot resize volumes comprised of different layout types. If you try to do so, an error message displays stating that the volume contains a different organization. The new_length operand can begin with a plus (+) or minus (-) to indicate that the new length is added to or subtracted from from the cur- rent volume length. Specify the new length, or change in length, in Veritas Volume Manager standard length units (see vxintro(1M)). The vxresize command accepts the Intelligent Storage Provisioning (ISP) storage specification arguments that are used with the vxassist command, and other vxassist specification arguments such as mirror, stripe and alloc if the volume is not an ISP volume. The arguments are passed unmodified to the vxassist command. For example, medianame operands can be specified to name the disks that are to be used for allocating new space for a volume. These argu- ments can be a simple name for a disk media record, or they can be of the form medianame, offset to specify an offset within the named disk. If an offset is specified, then regions from that offset to the end of the disk are considered candidates for allocation. If a medianame operand is prefixed by !, the specified storage is excluded from the allocation process. See the vxassist(1M) manual page for information about storage specification arguments. OPTIONS
-b Performs the resize operation in the background. The command returns quickly, but the resize will be in progress. Use the vxprint command to determine when the operation completes. Note: This option is only honored for grow operations on non-RAID5 volumes. Otherwise, it is ignored. -f Forces a operation that is usually disallowed by vxresize. -F fstype Supplies the type of the file system to be resized. -g diskgroup Limits operation of the command to the given disk group, as specified by disk group ID or disk group name. The volume operand is evaluated relative to the given disk group. -n Prevents resizing of a volume if it does not contain a file system. -s Requires that the operation represent a decrease in the volume length. -t tasktag If any tasks are registered to track the progress of the operation, mark them with the tag tasktag. The tag specified by tasktag is a sequence of up to 16 alphanumeric characters. -x Requires that the operation represent an increase in the volume length. Fail the operation otherwise. Hardware-Specific Options Some environments provide guidelines to optimize VxVM's interaction with intelligent storage systems. If these guidelines are present, VxVM follows the guidelines when creating volumes or allocating space for volumes. By default, vxresize only resizes volumes such that the vol- umes conform with these guidelines. The following options change the behavior of vxresize: -o override Resizes the specified volume and ignores any storage-specific guidelines. Overriding the guidelines is not recommended as it can result in incompatible objects, or objects that cannot be administered by VxVM and any associated software that exploit storage- specific features. -o verify Verifies that the specified volume can be resized without violating any storage-specific guidelines, but does not resize the vol- ume. If any guidelines are violated, vxresize exits with an error message. Note: These options need a specific license. Without the license, vxresize ignores the specified option. NOTES
When a non-ISP volume is grown, its layout may be converted as a side effect if vxassist determines that the new volume is too large for the original layout. The values of the stripe-mirror-col-trigger-pt and stripe-mirror-col-split-trigger-pt attributes (by default, 1 giga- byte) control whether a new layout will be applied. A mirror-stripe volume that is larger than the value of stripe-mirror-col-trigger-pt is converted to a stripe-mirror volume. If each column of a stripe-mirror-col volume is larger than the value of stripe-mirror-col-split- trigger-pt, the volume is converted to a stripe-mirror-sd volume where the individual subdisks, rather than the columns, are mirrored. A mirror-concat volume that is larger than the value of stripe-mirror-col-split-trigger-pt is converted to a concat-mirror volume where the individual subdisks, rather than the plexes, are mirrored. When a non-ISP volume is shrunk, its layout may be converted as a side effect if vxassist determines that the new volume is too small for the original layout. The values of the stripe-mirror-col-trigger-pt and stripe-mirror-col-split-trigger-pt attributes (by default, 1 giga- byte) control whether a new layout will be applied. A stripe-mirror volume that is smaller than the value of stripe-mirror-col-trigger-pt is converted to a mirror-stripe volume. A concat-mirror volume that is smaller than the value of stripe-mirror-col-split-trigger-pt is converted to a mirror-concat volume. If the new layout of a non-ISP volume is inappropriate, use the vxassist convert operation to change the layout after the grow or shrink operation has finished. For a CFS file system, the vxresize command must be executed on the CVM master node (as indicated by vxdctl -c mode), which must also be the CFS primary (as indicated by fsclustadm -v showprimary mount_point). If the master node is not the same node as the CFS primary, you can grow a CFS file system by running the vxassist growto or growby command on the CVM master node, followed by the fsadm -b command on any CFS node. To shrink a CFS file system, run the fsadm -b command on any CFS node, and then run the vxassist shrinkto or shrinkby command on the CVM master node. It is not possible to resize a component volume of a volume set that has an unmounted file system. This is because the extendfs command is not supported for volume sets with unmounted file systems. SEE ALSO
extendfs_vxfs(1M), fsadm_vxfs(1M), vxassist(1M), vxintro(1M), vxprint(1M), vxtask(1M) Veritas Volume Manager Administrator's Guide Veritas Storage Foundation Intelligent Storage Provisioning Administrator's Guide VxVM 5.0.31.1 24 Mar 2008 vxresize(1M)
All times are GMT -4. The time now is 09:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy