Sponsored Content
Top Forums Shell Programming and Scripting scripting help: to include r in between / : Post 302379351 by rveri on Thursday 10th of December 2009 12:26:16 PM
Old 12-10-2009
scripting help: to include r in between / :

Hi Experts,
Greetings! ,

I have a list of lvs that is having 3 column separated by / .
Want to add "r" after the 3rd / :


Code:
/dev/vgdbnhpu/u01          
/dev/vgdbnhpu/u02
/dev/vgdbnhpu/u03
/dev/vgdbnhpu/u04
/dev/vgdbnhpu/u05
/dev/vgdbnhpu/u06
/dev/vgdbnhpu/u07
/dev/vgdbnhpu/u08
/dev/vgdbnhpu/u09
/dev/vgdbnhpu/d21
/dev/vgdbnhpu/d22



To be change to :
Code:
/dev/vgdbnhpu/ru01
/dev/vgdbnhpu/ru02
/dev/vgdbnhpu/ru03
/dev/vgdbnhpu/ru04
/dev/vgdbnhpu/ru05
/dev/vgdbnhpu/ru06
/dev/vgdbnhpu/ru07
/dev/vgdbnhpu/ru08
/dev/vgdbnhpu/ru09
/dev/vgdbnhpu/rd21
/dev/vgdbnhpu/rd22


Please help with some of yours magic script:
Thanks in adv,
 

10 More Discussions You Might Find Interesting

1. Programming

Include files

Hi, I am new to the unix networking. I have written one client and server for UDP sockets.. I got the following errors while conpilation I have include all include files. Could some one help ...is there any other file to be included.....? will the include files change on different unix... (3 Replies)
Discussion started by: reddyb
3 Replies

2. UNIX for Dummies Questions & Answers

#include?

I have a file that contains some variables that I may want to share throughout multiple scripts. I think there's an #include command in UNIX. How do I use it (in korn)? (1 Reply)
Discussion started by: yongho
1 Replies

3. Programming

About $include

Hi, In my code,I come across include statements with $ sign what it represents... $include "getsum.h" /* This how I seen in my code */ Sarwan (5 Replies)
Discussion started by: sarwan
5 Replies

4. UNIX for Advanced & Expert Users

dhcp include

I want to include all the subnet files under /etc/dhcpd/ to /etc/dhcpd.conf so here is my content of dhcpd.conf ... include "/etc/dhcpd/*"; however, the check-syntax reports syntax error, as they do not recognize the wildcard *, and display that " file /etc/dhcpd/* could not be found. ... (1 Reply)
Discussion started by: fredao
1 Replies

5. Shell Programming and Scripting

how to include code

Hi, I have an easy question... My ksh script has a section with non ksh script in it - let's pretent it is VBA code. I need to include this vba script in my ksh script into so that my VBA script can be reused elsewhere by other ksh script by "$include" into other ksh scripts. What is the syntax... (3 Replies)
Discussion started by: ihot
3 Replies

6. Programming

Include directive

Hi there, I'm working on a c++ project and I need to use some libraries which are part of a framework. I installed it on my home directory, and alle the .hh are located in subdirs of my home. I'd like to include the files I need just as if they where std c header, that is: #include... (2 Replies)
Discussion started by: clalfa
2 Replies

7. Programming

help with C #include

i have three files a.h t.c and p.c a.h has 3 functions only and does not include anything p.c has one function i made called go t.c has a main function and calls the go function, it includes a.h only i run the program using gcc -Wall -g -o t p.c t.c but i get a warning, implicet... (2 Replies)
Discussion started by: omega666
2 Replies

8. Solaris

include files

Our admin has upgraded our OS solaris system to 5.11 but no more I can compile any trivial or non-trivial code. I'm trying to compile a trivial c++ program(a Helloworld program) but It gives error indicating that include files do not exist (in this trivial case <stdio.h>), it starts compiling but... (1 Reply)
Discussion started by: Newsha
1 Replies

9. Red Hat

%include in kickstart

RHEL 5.4 I'm trying to use %include statements in my kickstarts, and am running into some problems. In %pre, I can %include /mnt/source/isolinux/setup-questions and that works just fine. One of the things it does is echo out several variables to /tmp/vars In %post --nochroot, I copy... (2 Replies)
Discussion started by: jnojr
2 Replies

10. Programming

Include files

I have an implementation file tomog.cpp that implements a class called Tomog where I need to include its header file which resides in another place. How can I best specify the include file? I would not like to do #include "../../tomso/tomography/tomog.hpp" I wish to do instead ... (3 Replies)
Discussion started by: kristinu
3 Replies
LVDISPLAY(8)						      System Manager's Manual						      LVDISPLAY(8)

NAME
lvdisplay - display attributes of a logical volume SYNOPSIS
lvdisplay [-a|--all] [-c|--colon] [-d|--debug] [-h|-?|--help] [--ignorelockingfailure] [--ignoreskippedcluster] [--maps] [--nosuffix] [-P|--partial] [--units hHbBsSkKmMgGtTpPeE] [-v|--verbose] [--version] [LogicalVolumePath [LogicalVolumePath...]] lvdisplay --columns|-C [--aligned] [-a|--all] [-d|--debug] [-h|-?|--help] [--ignorelockingfailure] [--ignoreskippedcluster] [--noheadings] [--nosuffix] [-o|--options [+]Field[,Field...]] [-O|--sort [+|-]Key1[,[+|-]Key2...]] [-P|--partial] [--segments] [--separator Separator] [--unbuffered] [--units hHbBsSkKmMgGtTpPeE] [-v|--verbose] [--version] [LogicalVolumePath [LogicalVolumePath...]] DESCRIPTION
lvdisplay allows you to see the attributes of a logical volume like size, read/write status, snapshot information etc. lvs(8) is an alternative that provides the same information in the style of ps(1). lvs(8) is recommended over lvdisplay. OPTIONS
See lvm(8) for common options and lvs for options given with --columns. --all Include information in the output about internal Logical Volumes that are components of normally-accessible Logical Volumes, such as mirrors, but which are not independently accessible (e.g. not mountable). For example, after creating a mirror using lvcreate -m1 --mirrorlog disk, this option will reveal three internal Logical Volumes, with suffixes mimage_0, mimage_1, and mlog. -c, --colon Generate colon separated output for easier parsing in scripts or programs. N.B. lvs(8) provides considerably more control over the output. The values are: * logical volume name * volume group name * logical volume access * logical volume status * internal logical volume number * open count of logical volume * logical volume size in sectors * current logical extents associated to logical volume * allocated logical extents of logical volume * allocation policy of logical volume * read ahead sectors of logical volume * major device number of logical volume * minor device number of logical volume -m, --maps Display the mapping of logical extents to physical volumes and physical extents. To map physical extents to logical extents use: pvs --segments -o+lv_name,seg_start_pe,segtype --columns, -C Display output in columns, the equivalent of lvs. Options listed are the same as options given in lvs(8). Examples Shows attributes of that logical volume. If snapshot logical volumes have been created for this original logical volume, this command shows a list of all snapshot logical volumes and their status (active or inactive) as well: lvdisplay -v /dev/vg00/lvol2 Shows the attributes of this snapshot logical volume and also which original logical volume it is associated with: lvdisplay /dev/vg00/snapshot SEE ALSO
lvm(8), lvcreate(8), lvs(8), lvscan(8), pvs(8) Sistina Software UK LVM TOOLS 2.02.105(2)-RHEL7 (2014-03-26) LVDISPLAY(8)
All times are GMT -4. The time now is 04:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy