Sponsored Content
Top Forums Shell Programming and Scripting find 2 line numbers, grab text in between Post 302090566 by anbu23 on Tuesday 26th of September 2006 12:07:02 PM
Old 09-26-2006
Code:
sed -n "/Tablespace Percent Total Free/,/Tablespace Free Space Avg Fragmentation/{ /Tablespace Free Space Avg Fragmentation/!p; }" file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to print out line numbers of a text file?

i have this text file name test.txt which contain : aaaaa bbb iiiiiiiiiiiii ccf ddaaa ddd and i need a script that can print out the line numbers using a while loop.. so when the script is run..it will have this: 1 2 3 any ideas? :) thanks guys (4 Replies)
Discussion started by: forevercalz
4 Replies

2. Shell Programming and Scripting

how to add line numbers in text file

Hi all How to add line numbers in text file.. ex abcd cdef result 1. abcd 2. cdef thx in advance (4 Replies)
Discussion started by: suryanarayana
4 Replies

3. Shell Programming and Scripting

Grepping text by providing line numbers.

Dear Friends, I have a flat file from which I want to grep line no. 7,10, 19 to 35, 37. How can it be done? Thank you in advance Anushree (6 Replies)
Discussion started by: anushree.a
6 Replies

4. Shell Programming and Scripting

How to find the matched numbers between 2 text file using perl program??

hi dudes, I nee you kind assistance, I have to find the matched numbers from 2 text files and output of matched numbers should be in another text file.. I do have text files like this , for example File 1 787 665*5-p 5454 545-p 445-p 5454*-p File 2 5455 787 445-p 4356 2445 144 ... (3 Replies)
Discussion started by: sureshraj
3 Replies

5. Shell Programming and Scripting

How to find numbers in text file?

Hi I have a text file with rows like this: 7 Herman ASI-40 Jungle (L) Blueprint (L) Weapon Herman ASI-40 Jungle (L) 215.00 57 65.21 114.41 and 9 Herman CAP-505 (L) Blueprint (L) Weapon Herman CAP-505 (L) 220.00 46.84 49.1 104.82 and 2 ClericDagger 1C blueprint Melee - Shortblade... (2 Replies)
Discussion started by: pesa
2 Replies

6. UNIX for Dummies Questions & Answers

Extracting lines from a text file based on another text file with line numbers

Hi, I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

7. Shell Programming and Scripting

How Select numbers from a line of text, and remove leading spaces?

I have a text file with a line of text that contains numbers and text formatted into groups. I need to extract the number that can be either 1,2 or 3 digits long. Then write it to a variable, but i need to remove any leading spaces in the number first. I can get the numbers out but how to remove... (12 Replies)
Discussion started by: kcpoole
12 Replies

8. Shell Programming and Scripting

How to add line numbers (multiples of 5: 0,5,10,15,20) to a text file?

Hi, I need to number the lines in my text file. I know how to do this with standard numbering (1,2,3,4, etc) but I need to count in multiples of 5, beginning 0,5,10,15... example existing file: abcd efg hijklm nopqrs desired output 0 abcd 5 efg 10 hijklm 15 ... (11 Replies)
Discussion started by: livbaddeley
11 Replies

9. Shell Programming and Scripting

Grab text after pattern on the same line

data: 8iW5iPACIb5fafafEU24f3EOOjpakx6VwxBX+NafafxJMWX8iW5iPACIb5fafafEU24f3EOOjpakx6VwxBX+NafafxJMWX8iW5i PACIb5fafafEU24f3EOOjpakx6VwxBX+NafafxJMWX8iW5iPACIb5fafafEU24f3EOOjpakx6VwxBX+ 8nwR15UzfeZafaf2bGr8akx6VwxBX+NafafxJMWX8iW5iPACIb5fafafEU24f3EOOjp lVpOoMLXJ ... (19 Replies)
Discussion started by: SkySmart
19 Replies

10. UNIX for Beginners Questions & Answers

Find duplicates in file with line numbers

Hello All, This is a noob question. I tried searching for the answer but the answer found did not help me . I have a file that can have duplicates. 100 200 300 400 100 150 the number 100 is duplicated twice. I want to find the duplicate along with the line number. expected... (4 Replies)
Discussion started by: vatigers
4 Replies
E2FREEFRAG(8)						      System Manager's Manual						     E2FREEFRAG(8)

NAME
e2freefrag - report free space fragmentation information SYNOPSIS
e2freefrag [ -c chunk_kb ] [ -h ] filesys DESCRIPTION
e2freefrag is used to report free space fragmentation on ext2/3/4 file systems. filesys is the filesystem device name (e.g. /dev/hdc1, /dev/md0). The e2freefrag program will scan the block bitmap information to check how many free blocks are present as contiguous and aligned free space. The percentage of contiguous free blocks of size and of alignment chunk_kb is reported. It also displays the mini- mum/maximum/average free chunk size in the filesystem, along with a histogram of all free chunks. This information can be used to gauge the level of free space fragmentation in the filesystem. OPTIONS
-c chunk_kb If a chunk size is specified, then e2freefrag will print how many free chunks of size chunk_kb are available in units of kilobytes (Kb). The chunk size must be a power of two and be larger than filesystem block size. -h Print the usage of the program. EXAMPLE
# e2freefrag /dev/vgroot/lvhome Device: /dev/vgroot/lvhome Blocksize: 4096 bytes Total blocks: 1504085 Free blocks: 292995 (19.5%) Min. free extent: 4 KB Max. free extent: 24008 KB Avg. free extent: 252 KB HISTOGRAM OF FREE EXTENT SIZES: Extent Size Range : Free extents Free Blocks Percent 4K... 8K- : 704 704 0.2% 8K... 16K- : 810 1979 0.7% 16K... 32K- : 843 4467 1.5% 32K... 64K- : 579 6263 2.1% 64K... 128K- : 493 11067 3.8% 128K... 256K- : 394 18097 6.2% 256K... 512K- : 281 25477 8.7% 512K... 1024K- : 253 44914 15.3% 1M... 2M- : 143 51897 17.7% 2M... 4M- : 73 50683 17.3% 4M... 8M- : 37 52417 17.9% 8M... 16M- : 7 19028 6.5% 16M... 32M- : 1 6002 2.0% AUTHOR
This version of e2freefrag was written by Rupesh Thakare, and modified by Andreas Dilger <adilger@sun.com>, and Kalpak Shah. SEE ALSO
debugfs(8), dumpe2fs(8), e2fsck(8) E2fsprogs version 1.42.9 December 2013 E2FREEFRAG(8)
All times are GMT -4. The time now is 11:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy