08-22-2019
Hi Jim,
Thanks so much for your suggestions. I am very happy with your solution.
Last edited by bhas85; 08-22-2019 at 09:23 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (2 Replies)
Discussion started by: pharos467
2 Replies
2. Shell Programming and Scripting
Hi,
I would like to know how to get a list of files that contain a specific string inside them.
Thanks (12 Replies)
Discussion started by: yoavbe
12 Replies
3. Shell Programming and Scripting
Hi,
I have a directory has DIR1 and the D1 directory has 200+ files.
I want change the string from "Bangalore" to "Bangaluru" in all files in the D1 directory.
Thanks (2 Replies)
Discussion started by: koti_rama
2 Replies
4. Shell Programming and Scripting
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (11 Replies)
Discussion started by: pharos467
11 Replies
5. Shell Programming and Scripting
Hi ,
I have a directory structure as dir and subdirectories and files under it and so on.now I need to find the files which contain the search string under every dir and subdir and replace .
my search string is like
searchstring=/a/b
string to be replaced=/a/c/b
please help.
... (7 Replies)
Discussion started by: mohanpadamata
7 Replies
6. Shell Programming and Scripting
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies
7. Shell Programming and Scripting
I have 100+ python files in a single directory. I need to replace a specific path occurrence with a variable name.
Following are the find and the replace strings:
Findstring--"projects\\Debugger\\debugger_dp8051_01\\debugger_dp8051_01.cywrk"
Replacestring--self.projpath
I tried... (5 Replies)
Discussion started by: noorsam
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a very large file that contains a listing of all files on the system. I need to create a listing from that file of all files that start with the following format: s???_*, whereas the '?' represents characters, so the file name begins with an 's' followed by three other characters and... (4 Replies)
Discussion started by: tes218
4 Replies
9. Ubuntu
I have tried just about every find and grep command possible and I cannot find these damn files!!
This is the problem:
On the node you just swapped in, there are 5 JPEG files whose names contain the word "intro" in some form. Find all five files from on the entire disk (i.e. from root /).
... (2 Replies)
Discussion started by: dukeu69
2 Replies
10. Shell Programming and Scripting
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
LEARN ABOUT DEBIAN
mail::bulkmail::dummyserver
Bulkmail::DummyServer(3pm) User Contributed Perl Documentation Bulkmail::DummyServer(3pm)
NAME
Mail::Bulkmail::DummyServer - dummy class for dummy server objects
AUTHOR
Jim Thomason, jim@jimandkoka.com
DESCRIPTION
Mail::Bulkmail::DummyServer is a drop in replacement for Mail::Bulkmail::Server.
Sometimes you just want to test things on your end - make sure your list iterates properly, make sure your mail merge is functioning fine,
make sure your logging functions are correct, whatever. And in those cases, you probably don't want to worry about futzing around with
your SMTP relay and sending junk messages through it that you don't care about. Not to mention the fact that those probably will need to be
inspected and deleted later. A hassle for debugging.
Enter DummyServer. This is a subclass of Mail::Bulkmail::Server that behaves exactly the same except for the fact that it doesn't actually
connect to a server. Instead, it sends all data that would be going to the server to a file instead. This file should be specified in the
conf file.
#in your conf file
define package Mail::Bulkmail::DummyServer
dummy_file = ./my.dummy.file
Now, instead of sending commands to your SMTP relay, they'll get sent to ./my.dummy.file for easy inspection at a later date.
CLASS ATTRIBUTES
dummy_file Stores the dummy_file that you want to output your data to.
METHODS
connect "connects" to your DummyServer. Actually, internally it ties a filehandle onto this package. Yes, this thing has a (minimal)
implementation of a tied handle class to accomplish this feat.
This method is known to return
MBDu001 - server won't say EHLO
disconnect overloaded disconnect method. Wipes out the internal socket as usual, but doesn't try to say RSET or QUIT to the server.
disconnect can also disconnect quietly, i.e., it won't try to issue a RSET and then quit before closing the socket.
$server->disconnect(); #issues RSET and quit
$server->disconnect('quietly'); #issues nothing
SEE ALSO
Mail::Bulkmail::Server
COPYRIGHT (again)
Copyright and (c) 2003 James A Thomason III (jim@jimandkoka.com). All rights reserved. Mail::Bulkmail::DummyServer is distributed under
the terms of the Perl Artistic License.
CONTACT INFO
So you don't have to scroll all the way back to the top, I'm Jim Thomason (jim@jimandkoka.com) and feedback is appreciated. Bug
reports/suggestions/questions/etc. Hell, drop me a line to let me know that you're using the module and that it's made your life easier.
:-)
perl v5.8.8 2008-03-04 Bulkmail::DummyServer(3pm)