Sponsored Content
Full Discussion: delete lines
Top Forums Shell Programming and Scripting delete lines Post 302360461 by su_in99 on Friday 9th of October 2009 03:34:44 AM
Old 10-09-2009
Hi Danmero, I got it.
I am grateful for your help.
All the best,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to delete first 5 lines and last five lines in all text files

Hi I want to delete first five and last five lines in text files without opening the file and also i want to keep the same file name for all the files. Thanks in advance!!! Ragav (10 Replies)
Discussion started by: ragavendran31
10 Replies

2. Shell Programming and Scripting

Grep and delete lines except the lines with strings

Hi I am writing a script which should read a file and search for certain strings 'approved' or 'removed' and retain only those lines that contain the above strings. Ex: file name 'test' test: approved package waiting for approval package disapproved package removed package approved... (14 Replies)
Discussion started by: vj8436
14 Replies

3. Shell Programming and Scripting

How to delete lines in a file that have duplicates or derive the lines that aper once

Input: a b b c d d I need: a c I know how to get this (the lines that have duplicates) : b d sort file | uniq -d But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Discussion started by: necroman08
3 Replies

4. Shell Programming and Scripting

sed problem - delete all lines until a match on 2 lines

First of all, I know this can be more eassily done with perl or other scripting languages but, that's not the issue. I need this in sed. (or wander if it's possible ) I got a file (trace file to recreate the control file from oracle for the dba boys) which contains some lines another line... (11 Replies)
Discussion started by: plelie2
11 Replies

5. UNIX for Dummies Questions & Answers

How get only required lines & delete the rest of the lines in file

Hiiii I have a file which contains huge data as a.dat: PDE 1990 1 9 18 51 28.90 24.7500 95.2800 118.0 6.1 0.0 BURMA event name: 010990D time shift: 7.3000 half duration: 5.0000 latitude: 24.4200 longitude: 94.9500 depth: 129.6000 Mrr: ... (7 Replies)
Discussion started by: reva
7 Replies

6. Shell Programming and Scripting

need to delete all lines from a group of files except the 1st 2 lines

Hello, I have a group of text files with many lines in each file. I need to delete all the lines in each and only leave 2 lines in each file. (3 Replies)
Discussion started by: script_op2a
3 Replies

7. UNIX for Advanced & Expert Users

In a huge file, Delete duplicate lines leaving unique lines

Hi All, I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space. I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies

8. Shell Programming and Scripting

search and replace, when found, delete multiple lines, add new set of lines?

hey guys, I tried searching but most 'search and replace' questions are related to one liners. Say I have a file to be replaced that has the following: $ cat testing.txt TESTING AAA BBB CCC DDD EEE FFF GGG HHH ENDTESTING This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies

9. Shell Programming and Scripting

Sed/awk to delete single lines that aren't touching other lines

Hello, I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below). Example: one two three four five six seven eight I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies

10. UNIX for Beginners Questions & Answers

Delete multiple lines between blank lines containing two patterns

Hi all, I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex: user: alpha parameter_1 = 15 parameter_2 = 1 parameter_3 = 0 user: alpha parameter_1 = 15 parameter_2 = 1 parameter_3 = 0 user: alpha parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
quot_vxfs(1M)															     quot_vxfs(1M)

NAME
quot_vxfs: quot - summarize ownership on a VxFS file system SYNOPSIS
filesystem ... DESCRIPTION
displays the number of 1024-byte blocks in the specified VxFS filesystem that are currently owned by each user. filesystem is either the name of the directory on which the file system is mounted or the name of the device containing the file system. Options recognizes the following options: Specifies file system type. Generate a report for all mounted file systems. Report file system size instead of user statistics. The option generates histogram statistics in 3-column format: Column 1: File size in blocks. Sizes are listed in ascending order up to 499 blocks per file. Files occupying 499 or more blocks are counted together on a single line as 499-block files, but column 3 is based on actual number of blocks occupied. Column 2: Number of files of size indicated in column 1. Column 3: Cumulative total blocks occupied by files counted in current plus all preceding lines. The option overrides the and options. Display the number of files and space occupied by each user. Calculate the number of blocks in the file based on file size rather than actual blocks allocated. The option does not account for sparse files (files with holes in them). Accept ncheck(1M) data as input. The following pipeline will produce a list of all files and their owners: Display three columns containing the number of blocks not accessed in the last 30, 60, and 90 days. Validate the command line options, but do not execute the command. If the options specified are valid, echoes the complete command line. If the options specified are not valid, it prints an error message. Operands recognizes the following operand: filesystem Name of the directory on which the VxFS file system is mounted or the name of the device containing the file system.. EXAMPLES
The following examples show the output of using various options. AUTHOR
Disk Quotas were developed by the University of California, Berkeley, Sun Microsystems, Inc., and HP. FILES
Mounted file system table Password file (contains user names). SEE ALSO
du(1), find(1), ls(1), fstyp(1M), mount(1M), ncheck(1M), quot(1M), repquota(1M), quota(5). quot_vxfs(1M)
All times are GMT -4. The time now is 05:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy