04-21-2012
search and delete the lines in a file
HI group members
I am new in unix
I want to search # symbol in a file.
if found need to delete the entire row in the file.
need to move the actual data(with out # symbol data) to another file.
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I've been searching in this forum for the last 4 hours trying to do one thing: search 2 lines and delete the above line. So far I have not be able to find something similar in this forum, so I need help. This is what I'm trying to do. For example, I have a file called file1:
file1
word1... (4 Replies)
Discussion started by: shamushamu
4 Replies
2. Shell Programming and Scripting
Hi all coders,
I need a help to process some data.
I have this file,
3 09/21/08 03:32:07 started undef mino Oracle nmx004.wwdc.numonyx.co
m
Message Text : The Oracle session with the PID 1103 has a CPU time
consuming of 999.00... (3 Replies)
Discussion started by: vikas027
3 Replies
3. Shell Programming and Scripting
I have my data something like this
I need to search for the keyword yyyy in the susequent lines and if it is present, delete the second line with keyword.
In other words, if a keywords is found in two subsequent lines delete the second line.
input data:
aaaa bbbbb cccc dddd
xxxx... (4 Replies)
Discussion started by: rdhanek
4 Replies
4. Shell Programming and Scripting
Hi all!
A bit of background: I am trying to create a script that formats SQL statements. I have gotten so far as to add new lines based on certain match criteria like commas, keywords etc. In the process, I end up adding newlines where I don't want.
For example: substr(colName, 1, 10)... (3 Replies)
Discussion started by: jayarkay
3 Replies
5. UNIX for Advanced & Expert Users
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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
Hello,
i have a question.
My problem is that i have a file like:
TEST
JOHN
ADAM
MICHAEL
SEBASTIAN
ANDY
i want find for MICHAEL and want delete lines like this:
TEST (4 Replies)
Discussion started by: eightball
4 Replies
8. Shell Programming and Scripting
Hi All,
I have following input file. I wish to retain those lines which match multiple search criteria. The search criteria is stored in a variable seperated from each other by comma(,).
SEARCH_CRITERIA = "REJECT, DUPLICATE"
Input File:
ERROR,MYFILE_20130214_11387,9,37.75... (3 Replies)
Discussion started by: angshuman
3 Replies
9. Shell Programming and Scripting
I want to search 2 day older file and then delete last 10 line of that file. (2 Replies)
Discussion started by: sonu pandey
2 Replies
10. UNIX for Beginners Questions & Answers
Hi all, I was wondering if anyone would know how to search & delete inclusively between two lines, please:
Important:
There are multiple }; lines. I'm curious how to delete the correct one only.
Line numbers may vary each time this script is run.
For example, I'd like to delete only the... (6 Replies)
Discussion started by: chatguy
6 Replies
LEARN ABOUT HPUX
uildumpsymboltable
UilDumpSymbolTable(library call) UilDumpSymbolTable(library call)
NAME
UilDumpSymbolTable -- Dumps the contents of a named UIL symbol table to standard output
SYNOPSIS
#include <uil/UilDef.h>
void UilDumpSymbolTable(
sym_entry_type *root_ptr);
DESCRIPTION
The UilDumpSymbolTable function dumps the contents of a UIL symbol table pointer to standard output.
root_ptr Specifies a pointer to the the symbol table root entry. This value can be taken from the parse_tree_root part of the Uil_com-
pile_desc_type data structure returned by Uil.
By following the link from the root entry, you can traverse the entire parse tree. Symbol table entries are in the following format:
hex.address symbol.type symbol.data prev.source.position source.position modification.record
where:
hex.address
Specifies the hexadecimal address of this entry in the symbol table.
symbol.type
Specifies the type of this symbol table entry. Some possible types are root, module, value, procedure, and widget.
symbol.data
Specifies data for the symbol table entry. The data varies with the type of the entry. Often it contains pointers to other symbol
table entries, or the actual data for the data type.
prev.source.position
Specifies the end point in the source code for the previous source item.
source.position
Specifies the range of positions in the source code for this symbol.
The exact data structures for each symbol type are defined in the include file UilSymDef.h. Note that this file is automatically included
when an application includes the file UilDef.h.
RELATED
Uil(3)
UilDumpSymbolTable(library call)