Sponsored Content
Full Discussion: Remove trailing G
Top Forums Shell Programming and Scripting Remove trailing G Post 302185133 by Franklin52 on Monday 14th of April 2008 09:59:10 AM
Old 04-14-2008
You can remove the trailing character as follow:

Code:
sed 's/\(.*\)./\1/'

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove trailing newline characters

Hello , I have the folowing scenario : I have a text file as follows : (say name.txt) ABC DEF XYZ And I have one more xml file as follows : (say somexml.xml) <Name>ABC</Name> <Age>12</Age> <Class>D</Class> <Name>XYZ</Name> <Age>12</Age> <Class>D</Class> <Name>DEF</Name>... (7 Replies)
Discussion started by: shweta_d
7 Replies

2. UNIX for Dummies Questions & Answers

How to remove trailing spaces

Hi, I have a file like this (ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa ------------------------------------------------------------ 2007-06-30 00:00:00 I have a requirement where i need just the date. When i do: tail -1... (2 Replies)
Discussion started by: mahek_bedi
2 Replies

3. Shell Programming and Scripting

remove trailing spaces from a line

I want to remove the trailing spaces from any line of file. line ending does not follow any pattern. plz help (3 Replies)
Discussion started by: vikas_kesarwani
3 Replies

4. Shell Programming and Scripting

Remove trailing spaces from file

I'm currently writing my sql results to a file and they have trailing spaces after each field. I want to get rid of these spaces and I'm using this code: TVXTEMP=$(echo $TVXTEMP|sed -e 's/\ //g') It doesn't work though. I'm not familiar with sedscript, and the other codes I've found online... (6 Replies)
Discussion started by: avillanueva
6 Replies

5. Shell Programming and Scripting

How to remove trailing spaces from a variable?

I am getting a value from a csv file using CUT command, however the command extracting the records with trailing spaces. I am using the result into a sql session to fetch data, because of the trailing spaces the sql session is unable to fetch any data. Please let me know, how to remove this... (2 Replies)
Discussion started by: mady135
2 Replies

6. Shell Programming and Scripting

Remove of extra spaces from the trailing

HI, I need the help from the experts like I have created one file with text like: a b c d e f g h i j k l So my question is that i have to write the script in which like in the first sentence it will take only one space after d and remove all the extra space in the end.I dont... (8 Replies)
Discussion started by: bhanudhingra
8 Replies

7. Shell Programming and Scripting

Remove trailing zeros

Hi I have a simple request but can't find the answer. I want to remove trailing zeros, and in some cases the fullstops, from the input data. Example of input file: FR002_15.000_20.000 SD475_5.000_10.500 FG5647_12.250_15.500 BH2463_30.555_32.000 Desired output file would be: ... (10 Replies)
Discussion started by: theflamingmoe
10 Replies

8. Shell Programming and Scripting

Remove trailing 0 from the field

Hi Freinds, I have file1.txt as below file1.txt 1521894~~-0.400~201207 1521794~~-0.486~201207 152494~~-0.490~201207 152154894~~-0.490~201207 1521894354~~-0.489~201207 expected output : 1521894~~-0.4~201207 1521794~~-0.486~201207 152494~~-0.49~201207... (9 Replies)
Discussion started by: i150371485
9 Replies

9. Shell Programming and Scripting

Remove trailing space

Hi I am trying to remove trailing space from a string. value=${value%% } It is not working. What might be the issue with the above snippet. (7 Replies)
Discussion started by: munna_dude
7 Replies

10. Shell Programming and Scripting

Remove trailing number

I have some strings such as ABC1 ABC2 TYFASDD12 They will only have letters and numbers. In each case I want to remove the last digit? The lengths will vary. So a hard coded substr won't work. What do I do? if it doesn't end in a number, I don't want to remove any characters. (6 Replies)
Discussion started by: guessingo
6 Replies
volencap(8)						      System Manager's Manual						       volencap(8)

NAME
volencap, volreconfig - Encapsulates disks, partitions, or AdvFS domains SYNOPSIS
/usr/sbin/volencap [-g diskgroup] [-p volprefix] [privlen=nn] [nconfig=nn] { diskname | partition_name | domain_name }... /usr/sbin/volencap -k { diskname | partition_name | domain_name }... /usr/sbin/volencap -k -a /usr/sbin/volencap -s /sbin/volreconfig OPTIONS
Puts the encapsulated disk into the disk group specified by disk group ID or disk group name. Instructs volencap to use the specified vol- prefix as the prefix for LSM volume names generated. This is useful if the LSM volume names generated already exist. Instructs volencap to remove any pending encapsulation requests for the specified disk(s), partition(s), or domain(s). Instructs volencap to remove all pending encapsulation requests. Displays all pending encapsulation requests. DESCRIPTION
Disk partitions that have data can be added to LSM using the encapsulation process. This enables users with existing data in disk parti- tions to easily migrate to the use of LSM volumes instead of disk partitions. The /usr/sbin/volencap command is used to encapsulate one or many disk partitions or AdvFS domains. If an individual partition is specified for encapsulation, the volencap command creates a nopriv disk and a volume for that partition. If an entire disk is specified, the volencap command creates a nopriv disk and volume for each in-use partition on the disk. If an AdvFS domain is specified, all disk partitions in the domain are converted to LSM volumes. You can use the volencap command to encapsulate the partitions on the boot disk, including the root file system, primary swap, usr and var partitions, to place them under LSM control. See the Logical Storage Manager manual for more information on encapsulating these partitions. The volencap command can be run directly or through the voldiskadm menus. The volencap command generates LSM commands that are later exe- cuted by the /sbin/volreconfig command to perform the actual conversion of disk partitions to LSM volumes. If the disk partition contains a mounted file system or is otherwise open or in use, the volreconfig command will reboot the system to com- plete the encapsulation process. If you cannot reboot the system at the time you encapsulate the disk partition, either defer running the volreconfig command until you can reboot the system, or unmount or close the disk partition, then run the volreconfig command. See the Logical Storage Manager manual for more details. ATTRIBUTES
Specifies the size of the LSM private region in bytes, for example, privlen=1024. Specifies the number of log copies and copies of the configuration database, for example, nconfig=0. EXAMPLES
To encapsulate all disk partitions on the boot disk called dsk0 to LSM volumes, enter: # volencap dsk0 # volreconfig The volreconfig command will request confirmation prior to rebooting the system. The LSM command scripts created by the volencap command will execute as the system reboots. To encapsulate only the root file system (dsk0a) and swap (dsk0b) partitions on the boot disk, enter: # volencap dsk0a dsk0b # volreconfig The volreconfig command will request confirmation prior to rebooting the system. The LSM command scripts created by the volencap command will execute as the system reboots. To convert all disk partitions in the AdvFS domain called dom1 to LSM volumes, enter: # volencap dom1 # volreconfig The volreconfig command will determine if the domain is active, and if so, request confirmation prior to rebooting the system. The LSM command scripts created by the volencap command will execute as the system reboots. If the AdvFS filesets in domain dom1 are not mounted, then /sbin/volreconfig can be executed on the command line. To encapsulate the specific partition dsk1g to an LSM volume, enter: # volencap dsk1g # volreconfig The volreconfig command will determine if the partition is open, and if so, request confirmation prior to rebooting the system. The LSM command scripts created by the volencap command will be executed as the system reboots. SEE ALSO
volintro(8) volencap(8)
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy