02-13-2004
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a program that searches for a particular string patten. I am however having difficulty passing the varible $i (in a loop) as the string pattern to replace. Using either perl or sed search and replace statements, I get the same kinda result. For example, using the perl:
for i in... (3 Replies)
Discussion started by: Breen
3 Replies
2. UNIX for Advanced & Expert Users
I'm trying to do a global search and replace in vi. I am trying to replace a string, call it "BOB" with a carriage return and can't seem to find a reference to it.
Command syntax s%/BOB/???/g
What would I substitute the "???" with? (7 Replies)
Discussion started by: barnettdk
7 Replies
3. Shell Programming and Scripting
Is there any way we can achieve search & replace with awk?
I could achieve the same with sed in following way -
sed 's/A/B/g' file1 > file2
But the same regex if I try with using awk following way,
awk 's/A/B/g' file1 > file2
it gives me Syntax error. I strongly believe I am... (1 Reply)
Discussion started by: videsh77
1 Replies
4. Shell Programming and Scripting
I have a file that has some accent characters in it when viewed in some text editors, but when viewed in vi they come in as ~R and ~U. I need to make a script to remove these characters from the file, but have been unsuccessful. I am not sure how sed or awk, or something similar is viewing them,... (8 Replies)
Discussion started by: tcovert
8 Replies
5. UNIX for Dummies Questions & Answers
Hi ,
I ahve a text file which has several instances of the text such as
run_time: 09:30
I need to add double quotes before and after the time value
i.e: run_time: "09:30"
Any suggestions on how to go about the same (4 Replies)
Discussion started by: jobbyjoseph
4 Replies
6. Shell Programming and Scripting
Hi, i read couple of threads here on forum, and googled about what bugs me, yet i still can't find solution.
Problem is below.
I need to change this string (with sed if it is possible):
This is message text that is being quoted
to look like this:
This is message text that is being quotedI... (2 Replies)
Discussion started by: angrybb
2 Replies
7. Shell Programming and Scripting
Hi All,
I need help in manipulating the data in first column in a file.
The sample data looks like below,
Mon Jul 18 00:32:52 EDT 2011,NULL,UAT
Jul 19 2011,NULL,UAT
1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg.... (8 Replies)
Discussion started by: gr8_usk
8 Replies
8. Shell Programming and Scripting
Hi,
My problem is that I have to search a changing pattern and replace it with the wild card char "*"
i/p: 99_*_YYYYMMDD_SRC.txt.tar.gz
o/p: 99_*_*_SRC.txt.tar.gz
The problem is that YYYYMMDD pattern is not static. It could be YYYYMMDDHHMI or could be YYYYMMDDHHMISS.
Can... (10 Replies)
Discussion started by: dips_ag
10 Replies
9. Shell Programming and Scripting
Hi all
Please can you help me with a script to check several files for the following string:
encoding=""and replace it with:
encoding="UTF-8"I did the following, :
#!/bin/sh
string1="encoding="""
string2="encoding="UTF-8"
sed 's/'"$string1"'/'"$string2"'/g'but does not work.
Please can... (18 Replies)
Discussion started by: fretagi
18 Replies
10. Shell Programming and Scripting
Hi Gurus,
I have two files. I want to read sessoin_name from the file1 and replace $Param4 & $Param5 in file2 with connection_name in specified in file1.
The file1 will have data in following format
File 1
session_name,connection_name
s_abcd,Listener_2
s_def,Listener_1
source file... (7 Replies)
Discussion started by: r_t_1601
7 Replies
dlclose(3C) dlclose(3C)
NAME
dlclose() - close a shared library
SYNOPSIS
[flag ... ] file ... [library]...
Multithread Usage
This routine is thread-safe.
NOTE: The dynamic loader serializes the loading and unloading of shared libraries in multithreaded applications using a recursive pthread
mutex lock. See the for more information.
DESCRIPTION
is one of a family of routines that give the user direct access to the dynamic linking facilities (using the option on the compiler or com-
mand line). disassociates a shared object previously opened by from the current process. Once an object has been closed using its symbols
are no longer available to All objects loaded automatically as a result of invoking on the referenced object (see dlopen(3C)) are also
closed. handle is the value returned by a previous invocation of
RETURN VALUE
If the referenced object was successfully closed, returns If the object could not be closed, or if handle does not refer to an open object,
returns a non-0 value. More detailed diagnostic information is available through
ERRORS
If fails, a subsequent call to returns one of the following values.
Cannot apply relocation in library.
Cannot close library due to remaining dependencies.
Invalid handle.
Out of memory.
failed on entry to or exit from
failed on exit from
failed on entry to
Unknown handle.
WARNINGS
A successful invocation of does not guarantee that the objects associated with handle have actually been removed from the address space of
the process. Objects loaded by one invocation of may also be loaded by another invocation of The same object may also be opened multiple
times. An object is not removed from the address space until all references to that object through an explicit invocation have been closed
and all other objects implicitly referencing that object have also been closed.
Once an object has been closed by referencing symbols contained in that object can cause undefined behavior.
SEE ALSO
dlerrno(3C), dlerror(3C), dlopen(3C), dlsym(3C).
Texts and Tutorials
(See the option)
(See manuals(5) for ordering information)
dlclose(3C)