Sponsored Content
Full Discussion: Remove last pattern
Top Forums Shell Programming and Scripting Remove last pattern Post 302769056 by anil510 on Monday 11th of February 2013 06:11:32 AM
Old 02-11-2013
Remove last pattern

I have a file with entries below.
Code:
domain1.com.http:
domain2.com.49503:

I need this to be sorted like below. ie remove the patten after the last right-hand side . (dot).
Code:
domain1.com
domain2.com

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed remove everything up to the pattern

I have been search all over the internet to find a solution to this. I have a file that looks like: -a ItemConfig.custom=true -a Config.custom=true go -t malu -t Use=true I want to get "malu" as output, and the werid thing is the blank before go is neither space nor tab. what's the sed... (4 Replies)
Discussion started by: katrvu
4 Replies

2. UNIX for Advanced & Expert Users

Program to remove a pattern

Hi, I want to remove all occurances of a character which follows a ^ symbol. For ex: This is a Test ^H^@^@^@^@^@^@ File used in VI. ^@^@^B^VDM-BM-$|M-^_M-F^AM- In the above example, I should remove all characters which follows a ^. (^H ^@ ^B ^V etc) and It should print This is a Test... (4 Replies)
Discussion started by: arsheshadri
4 Replies

3. Shell Programming and Scripting

How to remove a file with a particular pattern

Hi I have a list of files in a folder.I have a search pattern in the file name and i want to remove the file with that pattern.How can that be made List of files xxxxx.ID1.yyyyy.zzzzz yyyy.ID2.bbbbb.kkkkk xxxxx.ID1.yyyyy.zzzzz yyyy.ID4.bbbbb.kkkkk xxxxx.ID1.yyyyy.zzzzz... (2 Replies)
Discussion started by: sparks
2 Replies

4. Shell Programming and Scripting

How to remove all text except pattern

i have nasty html file with 2000+ simbols in 1 row...i need to remove whole the code except title="Some title..." and store those into file with titles (the whole text is in variable text) i've tried something like this: echo $text | sed 's/.*\(title=\".+\"\).*/\1/' > titles.html BUT it does... (13 Replies)
Discussion started by: Lukasito
13 Replies

5. Shell Programming and Scripting

remove pattern with sed

Hi, i want to remove a certain pattern when i type pwd. pwd will look like this: ..../....../....../Pat_logs/..../....../...../...... the dotted lines are just random directory names, i want it to remove the "Pat_logs/...../....../....../" part so for example: ... (5 Replies)
Discussion started by: a27wang
5 Replies

6. Shell Programming and Scripting

Remove all line below the pattern

I have few files i want to delete all line before match and also print the match line. like Can anyone help. (8 Replies)
Discussion started by: james1988
8 Replies

7. Shell Programming and Scripting

Search a pattern in a line and remove another pattern

Hi, I want to search a pattern in a text file and remove another pattern in that file. my text file look like this 0.000000 1.970000 F 303 - 1.970000 2.080000 VH VH + 2.080000 2.250000 VH VH + 2.250000 2.330000 VH L - 2.330000 2.360000 F H + 2.360000 2.410000 L VL - 2.410000 ... (6 Replies)
Discussion started by: sreejithalokkan
6 Replies

8. UNIX for Advanced & Expert Users

How to remove a char before a pattern?

Hi I have a file where i want to remove a char before a specific pattern. exp: CREATE TABLE ( A, B, C, ----comma needs to be removed )AS SELECT A, B, C, ----comma needs to be removed FROM TABLE. So i want to delete the comma(,) after the C both ways.Pattern can be... (11 Replies)
Discussion started by: raju2016
11 Replies

9. Shell Programming and Scripting

How to remove the lines with this pattern?

Hello everyone, I have a sample data like this: Glyma.10G051100 Glyma.02G036000 89.91 228 23 0 1 228 1 228 1e-78 294 Glyma.10G051100 Glyma.09G023700 87.28 228 29 0 1 228 1 228 1e-68 261 Glyma.10G285200 Glyma.20G103800 96.33 1663 55 4 1 1657 1 1663 0.0 2728 Glyma.10G285200 Glyma.05G093700 95.02... (2 Replies)
Discussion started by: nengcheng
2 Replies

10. UNIX for Beginners Questions & Answers

awk to remove pattern and lines above pattern

In the awk below I am trying to remove all lines above and including the pattern Test or Test2. Each block is seperated by a newline and Test2 also appears in the lines to keep but it will always have additional text after it. The Test to remove will not. The awk executed until the || was added... (2 Replies)
Discussion started by: cmccabe
2 Replies
chvol(8)						      System Manager's Manual							  chvol(8)

NAME
chvol - changes the attributes of a volume SYNOPSIS
/sbin/chvol [-l] [-r blocks] [-w blocks] [-t blocks] [-c on | off] [-A] special domain OPTIONS
Activates a volume after an incomplete addvol or rmvol operation. Turns I/O consolidation mode on or off. Displays the range of I/O transfer sizes, in 512-byte blocks, as calculated by the kernel, based on the disk's geometry: rblks displays the minimum, the maximum, and the preferred transfer size for reads. wblks displays the minimum, the maximum, and the preferred transfer size for writes. Specifies the maximum number of 512-byte blocks that the file system reads from the disk at one time. Specifies the maximum number of dirty, 512-byte blocks that the file system will cache in-memory (per volume in a domain). Dirty means that the data has been written by the application but the file system has cached it in memory so it has not yet been written to disk. The number of blocks must be in multiples of 16. The valid range is 0-32768. The default (when a volume is added to a domain) is 16,384 blocks. For optimal performance, specify blocks in multiples of wblks (as specified by the -w option) and multiples of rblks (as specified by the -r option). Specifies the maximum number of 512-byte blocks that the file system writes to the disk at one time. OPERANDS
Specifies the block special device name, such as /dev/disk/dsk2c. Specifies the name of the file domain. DESCRIPTION
The chvol command enables you to change the attributes of a volume in an active domain. For example, the file system can consolidate a number of I/O transfers into a single, large I/O transfer. The larger the I/O transfer, the better the file-system performance. If you attempt to change the attributes of a volume in a domain that is not active, an error message is produced. The initial I/O transfer parameter for both reads and writes is typically 128 or 256 blocks, depending on the disk driver's preferred I/O transfer rate. Once you change the I/O transfer parameters with the -r option or the -w option, the parameters remain fixed until you change them again. The values for the I/O transfer parameters are limited by the device driver. Every device has a minimum and maximum value for the size of the reads and writes it can handle. If you set a value that is outside of the range that the device driver allows, the device automatically resets the value to the largest or smallest it can handle. By default, the I/O consolidation mode (cmode) is on. The cmode must be on for the I/O transfer parameters to take effect. You can use the -c option to turn the cmode off, which sets the I/O transfer parameter to one page. Interrupting an rmvol operation can leave the volume in an inaccessible state. If a volume does not allow new allocations after an rmvol operation, use the chvol command with the -A option to reactivate the volume. Using the chvol command without any options displays the current cmode and the I/O transfer parameters. RESTRICTIONS
The values for the wblks and rblks attributes are limited by the device driver. You must be the root user to use this command. EXAMPLES
The following example displays the cmode and the I/O transfer parameters of the /dev/disk/dsk1c volume in the domain1 file domain: # chvol /dev/disk/dsk1c domain1 rblks = 128 wblks = 128 cmode = on thresh = 16,384 The following example additionally toggles the cmode: # chvol -c off /dev/disk/dsk1c domain1 # chvol /dev/disk/dsk1c domain1 rblks = 128 wblks = 128 cmode = off thresh = 16,384 The following example continues by changing the I/O transfer parameters of reads (rblks) and writes (wblks) from 128 blocks to 256 blocks. Note that the cmode is off and must be on before the parameters take effect: # chvol -r 256 -w 256 -c on /dev/disk/dsk1c domain1 chvol /dev/disk/dsk1c domain1 rblks = 256 wblks = 256 cmode = on thresh = 16,384 The following example shows the I/O transfer range on domain1: # chvol -l /dev/disk/dsk0a domain1 chvol /dev/disk/dsk0a domain1 rblks: min = 16 max = 32768 pref = 256 wblks: min = 16 max = 32768 pref = 256 SEE ALSO
advfs(4), showfdmn(8) chvol(8)
All times are GMT -4. The time now is 06:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy