11-01-2008
How to Delete string without opening a file
Hi Experts,
I have several big size file arround 900 MB. From the file I need to delete some common strings but without opening the file. here is example- in file
<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
<LogItems>
<log logid="8423b5ae190810252359350480/1/1/1">
<category>ProcEngineBL.Normal</category>
<operation>DC::sendGetCommand</operation>
<starttime>20081025235935.515410</starttime>
<stoptime>20081025235935.723993</stoptime>
<status>FAILED</status>
</log>
<log logid="8423b5ae190810252359350480/1/1"><category>ProcEngineBL.Normal</category>
<operation>Get</operation>
<target>DC.Subscription</target>
<fullOperation>DC::getCommand</fullOperation>
<starttime>20081025235935.508385</starttime>
<stoptime>20081025235935.724373</stoptime>
<status>FAILED</status>
</log>
<log logid="8423b5ae136366384884759350480/1/1"><category>ProcEngineBL.Normal</category>
<operation>Get</operation>
<target>DC.Subscription</target>
<fullOperation>DC::getCommand</fullOperation>
<starttime>20081025235935.508385</starttime>
<stoptime>20081025235935.724373</stoptime>
<status>FAILED</status>
I want to delete the above Red Colored Strings from the File but without opeining the file. You know its 900MB file. so, its time consuming to open.
Please help.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi there guys,
wonder if any gurus can help me out on this one...
try searching the past threads but cant find anything.
i have this huge file but when i use vi to open it it gives me the following error:
<"pmrepserver.txt""/var/tmp/Ex86200" There is not enough space in the file... (7 Replies)
Discussion started by: lweegp
7 Replies
2. Shell Programming and Scripting
Hi,
Could someone tell me how to delete a particular text inside an existing file without opening the file?
e.g. I have a text file called mytext.txt which contains three lines of text below and I want to delete “ ;” and delete the second line “b ;” including the carriage return.
a ;
b ;
c ;... (12 Replies)
Discussion started by: stevefox
12 Replies
3. UNIX for Dummies Questions & Answers
Hi
To delete some text in 2 files in line1 ( not complete line) in unix without opening the files.
For example: source file is like this
<?xml version="1.0"... (5 Replies)
Discussion started by: pyaranoid
5 Replies
4. Shell Programming and Scripting
I have a control file which looks like this
LOAD DATA
INFILE '/array/data/data_Finished_T5_col_change/home/oracle/emp.dat'
PRESERVE BLANKS
INTO TABLE SCOTT.EMP
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(.................
..................)
How can i edit the... (1 Reply)
Discussion started by: mwrg
1 Replies
5. Shell Programming and Scripting
awk '!(/^$/||/--/||/selected/||/^ *$/){print "A." $1 " <> B." $1 " or"}' infile
my AWK out put is :
A.KZ <> B.KZ or
A.KZT <> B.KZT or
A.KZ_Z <> B.KZ_Z or
A.LH <> B.LH or
A.MAN<> B.MAN or
A.OBJEKT <> B.OBJECT or
A.PAK <> B.PAK ;
is there any way to controle AWK to not print the... (1 Reply)
Discussion started by: kanakaraju
1 Replies
6. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
7. UNIX for Dummies Questions & Answers
Hi , I am breaking my head from past one day ...to delete lines from a file which match to the string pattern.:wall:
I am storing the search string in a variable and search if the file exists in the folder,if not delete that entry from the file.
I am having problem to delete that line from... (2 Replies)
Discussion started by: rashmisb
2 Replies
8. Shell Programming and Scripting
Hi all
i want to write program with shell script that able compare two file content and if one of lines of file have # at the first of string or nothing find same string in one of two file . remove the line in second file that have not the string in first file. for example:
file... (2 Replies)
Discussion started by: saleh67
2 Replies
9. UNIX for Dummies Questions & Answers
I have file called "text". The contents are as below :
aaa
bbb
ccc
ddd
eee
ffff
ddd
hhhh
iiii
I want to read this file without opening and and delete the last line. How can it be done? (4 Replies)
Discussion started by: the_hunter
4 Replies
10. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT HPUX
xconnectionwatchproc
XConnectionWatchProc(3X) XLIB FUNCTIONS XConnectionWatchProc(3X)
NAME
XConnectionWatchProc - procedure called when internal connection opens or closes
SYNTAX
typedef void (*XConnectionWatchProc)(display, client_data, fd, opening, watch_data)
Display *display;
XPointer client_data;
int fd;
Bool opening;
XPointer *watch_data;
ARGUMENTS
display Specifies the connection to the X server.
client_data
Specifies the additional client data.
fd Specifies the file descriptor.
opening Specifies whether the connections is being opened or closed.
watch_data
Specifies a location for private watch_data.
DESCRIPTION
XConnectionWatchProc is registered by XAddConnectionWatch() and is called each time Xlib opens or closed an internal connection for the
specified display.
If opening is True, the procedure can store a pointer to private data in the location pointed to by watch_data; when the procedure is later
called for this same connection and opening is False, the location pointed to by watch_data will hold this same private data pointer.
The registered procedure should not call any Xlib functions. If the procedure directly or indirectly causes the state of internal connec-
tions or watch procedures to change, the result is not defined. If Xlib has been initialized for threads, the procedure is called with the
display locked and the result of a call by the procedure to any Xlib function that locks the display is not defined unless the executing
thread has externally locked the display using XLockDisplay.
SEE ALSO
XAddConnectionWatch(3X)
X Version 11 Release 6 XConnectionWatchProc(3X)