Sponsored Content
Top Forums Shell Programming and Scripting Help with parsing data with awk , eliminating unwanted data Post 302751433 by itkamaraj on Friday 4th of January 2013 02:33:05 AM
Old 01-04-2013
Code:
 $ nawk '/VG Name/{v=$NF}/PE Size/{ps=$NF}/Free PE/{fp=$NF}fp{print v,ps,fp;fp="";}' input.txt
/dev/vg00 8 2036
/dev/vg01 8 20366
/dev/vg02 8 203645
/dev/vg03 8 2036890

if you dont have nawk, then use awk
This User Gave Thanks to itkamaraj For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Parsing XML dynamic data via awk?

I am trying to use a line of output in an XML file as input in another new XML file for processing purposes via a shell script. Since I am a newbie though, I'm not sure how to do this since the data is different everytime. I am using this technique with static data right now: echo -n "Running... (5 Replies)
Discussion started by: corwin43
5 Replies

2. Shell Programming and Scripting

Remove unwanted data?

Hi Can any one help me remove the unwanted data? I would want to remove the complete event id 4910 ( the type there is INFO), that means, I have to remove starting from 7th - 19th lines. can any one of you please help? Thanks, (24 Replies)
Discussion started by: hitmansilentass
24 Replies

3. Shell Programming and Scripting

Eliminate unwanted data

Hi, I am stuck on writing a script that reads a file, retains wanted data but discards unwanted data from a CSV file. This is a sample of my table {not the actual data) ID Color tel_num Name color2 color3 abcdef green 5551212 jj88 red blue acbdfe yellow... (5 Replies)
Discussion started by: t524ube
5 Replies

4. Shell Programming and Scripting

Question about Awk for Data Parsing

Hi, I am doing some data parsing for some economics research. I was recently exposed to shell script and am brand new to awk. I have a large csv file (like 10G) and I would like to make it a lot smaller with awk, but it is a bit tricky for me and I haven't been able to get it yet. I would... (5 Replies)
Discussion started by: EconResearch
5 Replies

5. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

6. Shell Programming and Scripting

Help in Parsing data

I have below string Transaction_ID:SDP-DM-151204679 , Transaction_DateTime:2011-02-11 00:00:15 GMT+05:30 , Transaction_Mode:WAP , Circle_ID:4 , Circle_Name:BJ ,Zone: , CustomerID:B_31563486 , MSISDN:7870904329 , IMSI:405876122068099 , IMEI: , Sub_Profile:Pre-Paid , CPID:Nazara , CPNAME:Nazara ,... (6 Replies)
Discussion started by: poweroflinux
6 Replies

7. UNIX for Dummies Questions & Answers

Deleting the unwanted data based on condition

hi i have my input data like this aaa bbb ccc asa dff nmj mnj saa dff oik aax cdx saa oik asq sdf dssi want my output file to be like this mnj saa dff oik aax cdx saa oiki want to retain only those lines which will have oik just below them and i want oik to be as next column to those... (1 Reply)
Discussion started by: anurupa777
1 Replies

8. Shell Programming and Scripting

Parsing cron data with awk

Heya, I'm currently working on a script so I can see which cron jobs, if any, on a system are executing less frequently than 15 minutes (1 - 14 minutes). This is the only data I'm interested in. So far I have the following: #!/bin/bash IFS=$'\n';for line in `ls -f /var/spool/cron/*`; do... (5 Replies)
Discussion started by: Elvirnith
5 Replies

9. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies

10. Shell Programming and Scripting

awk --> math-operation in data-record and joining with second file data

Hi! I have a pretty complex job - at least for me! i have two csv-files with meassurement-data: fileA ...... (2 Replies)
Discussion started by: IMPe
2 Replies
VGEXTEND(8)						      System Manager's Manual						       VGEXTEND(8)

NAME
vgextend - add physical volumes to a volume group SYNOPSIS
vgextend [-A|--autobackup y|n] [-d|--debug] [-h|-?|--help] [--restoremissing] [-f|--force] [-t|--test] [-v|--verbose] [ PHYSICAL DEVICE OPTIONS ] VolumeGroupName PhysicalDevicePath [PhysicalDevicePath...] DESCRIPTION
vgextend allows you to add one or more initialized physical volumes ( see pvcreate(8) ) to an existing volume group to extend it in size. Moreover, it allows you to re-add a physical volume that has gone missing previously, due to a transient device failure, without re-ini- tialising it. Use vgextend --restoremissing to that effect. If PhysicalDevicePath was not previously configured for LVM with pvcreate (8), the device will be initialized with the same default values used with pvcreate. If non-default pvcreate values are are desired, they may be given on the commandline with the same options as pvcre- ate. See PHYSICAL DEVICE OPTIONS for available options. Note that the restore-related options such as --restorefile, --uuid, and --physi- calvolumesize are not available. If a restore operation is needed, use pvcreate (8) and vgcfgrestore (8). OPTIONS
See lvm for common options. PHYSICAL DEVICE OPTIONS
The following options are available for initializing physical devices in the volume group. These options are further described in the pvcreate man page. -f, --force -y, --yes -Z, --zero y|n --labelsector sector --metadatasize size [--metadataignorey|n] --pvmetadatacopies copies --dataalignment alignment --dataalignmentoffset alignment_offset Examples "vgextend vg00 /dev/sda4 /dev/sdn1" tries to extend the existing volume group "vg00" by the new physical volumes (see pvcreate(8) ) "/dev/sdn1" and /dev/sda4". SEE ALSO
lvm(8), vgcreate(8), vgreduce(8), pvcreate(8) Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) VGEXTEND(8)
All times are GMT -4. The time now is 05:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy