Sponsored Content
Full Discussion: pattern matching problem
Top Forums Shell Programming and Scripting pattern matching problem Post 302486079 by mirfan on Friday 7th of January 2011 12:20:52 AM
Old 01-07-2011
pattern matching problem

Thanks for the replies.
But sometimes To field contains email addresses in multiple lines. but following listed commands printing only 1st line. e.g.

Code:
To: test@example.com, test1@example.com,
      test2@example.com, test3@example.com,
      test4@example.com,

how to print entire To: field emails.

Code:
test@example.com, test1@example.com,
test2@example.com, test3@example.com,
test4@example.com,

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

pattern matching problem

I have a file with the following contents; NEW 85174 MP081 /29OCT07 CNL 85986 MP098 /28OCT07 NEW 86014 MP098 /28OCT07 NEW 86051 MP097 /27OCT07 CNL 86084 MP097 /27OCT07 Now I have to retrieve all lines that start with NEW and where the next line starts with CNL and where the MP codes are... (8 Replies)
Discussion started by: rein
8 Replies

2. Shell Programming and Scripting

problem with CASE pattern matching

I am using ksh on a HP Ux. I have a simple script but am having problem with the case statement:- #!/usr/bin/sh Chl=”SM.APPLE_SWIFT_DV” LoConfirm=”” case $chl in ) LoConfirm=”Using channel at Building 1” echo “test conditon1” echo $LoConfirm;; ) LoConfirm=”Using... (2 Replies)
Discussion started by: gummysweets
2 Replies

3. Shell Programming and Scripting

pattern matching problem

FilesToBackup='*.track* *.xml *.vm* *.gz Trace* TRACE* "*core*" *.out fcif_data_* esi_error_* *.rollback *.sed R.* APStatus_* log* *.output* send_mail* downenv* check_env* intaspurge_db_* sqlnet.log *.rpt *.html *.csv "*TSC*"' and i am using it like this- echo Moving files from $(pwd): ... (2 Replies)
Discussion started by: namishtiwari
2 Replies

4. Shell Programming and Scripting

Pattern Matching problem in UNIX

Hello All, I need help I have a problem in searching the pattern in a file let us say the file contains the below lines line 1 USING *'/FILE/FOLDER/RETURN') ................. ................. line 4 USING *'/FILE/FOLDER/6kdat1') line 5 USING... (2 Replies)
Discussion started by: maxmave
2 Replies

5. Shell Programming and Scripting

problem using sed for pattern matching

if abc.sh is 192.168.1.41 then the output that i get is v5c01 my code is sed 's/192.168.1.4/v5c0/g s/192.168.1.41/acc1/g' abc.sh 2>&1 | tee abc.sh i want to find 192.168.1.4 and replace it with v5c0 and find 192.168.1.41 and replace it with acc1 and i want to do it using sed (5 Replies)
Discussion started by: lassimanji
5 Replies

6. Shell Programming and Scripting

Problem extracting just a part of a matching pattern

Hello everyone, this is my first post so please give me a hand. I apologize for my English, I'll try to be clear with my request. I need to write a script (Bash) which finds all the variables defined in the file .h of the folder and then writes the name of the files .c where these variables are... (1 Reply)
Discussion started by: paxilpaz
1 Replies

7. Programming

pl sql . pattern matching problem

hi everyone i am facing a strange problem declare v_var number(10); begin if( regexp_like('RCDORMS_MMS_*_DAR','RCDORMS_MMS_*_DAR')) then v_var:=20; dbms_output.put_line(v_var); end if; end; / please tell me what's the wrong thing in this expression.. as i am not able to get... (1 Reply)
Discussion started by: aishsimplesweet
1 Replies

8. Shell Programming and Scripting

Pattern matching and format problem

Hi I need a bash script that can search through a text file and when it finds 'FSS1206' I need to put a Letter F 100 spaces after the second instance of FSS1206 The format is the same throughout the file I need to repeat this on every time it finds the second 'FSS1206' in the file I have... (3 Replies)
Discussion started by: firefox2k2
3 Replies

9. Shell Programming and Scripting

Pattern matching problem

Hi I need a bash script that can search through a text file for all lines starting with 71502FSC1206 on every line it finds starting with this I need to place a letter F at the 127 position on that line. Thanks Paul (6 Replies)
Discussion started by: firefox2k2
6 Replies

10. Shell Programming and Scripting

Pattern matching problem

if i have to do pattern match for file name with digit alphanumeric value like this File_1234.csv File_12sd45rg.csv i am using this File_*.csv and File_*.csv for digit pattern match. when i am doing pattern match for the digit then both alphanumeric match and digit match is coming. ... (3 Replies)
Discussion started by: ramsavi
3 Replies
Devel::Backtrace(3pm)					User Contributed Perl Documentation				     Devel::Backtrace(3pm)

NAME
Devel::Backtrace - Object-oriented backtrace VERSION
This is version 0.12. SYNOPSIS
my $backtrace = Devel::Backtrace->new; print $backtrace; # use automatic stringification # See EXAMPLES to see what the output might look like print $backtrace->point(0)->line; METHODS
Devel::Backtrace->new() Optional parameters: -start => $start, -format => $format If only one parameter is given, it will be used as $start. Constructs a new "Devel::Backtrace" which is filled with all the information "caller($i)" provides, where $i starts from $start. If no argument is given, $start defaults to 0. If $start is 1 (or higher), the backtrace won't contain the information that (and where) Devel::Backtrace::new() was called. $backtrace->point($i) Returns the i'th tracepoint as a Devel::Backtrace::Point object (see its documentation for how to access every bit of information). Note that the following code snippet will print the information of "caller($start+$i)": print Devel::Backtrace->new($start)->point($i) $backtrace->points() Returns a list of all tracepoints. In scalar context, the number of tracepoints is returned. $backtrace->skipme([$package]) This method deletes all leading tracepoints that contain information about calls within $package. Afterwards the $backtrace will look as though it had been created with a higher value of $start. If the optional parameter $package is not given, it defaults to the calling package. The effect is similar to what the Carp module does. This module ships with an example "skipme.pl" that demonstrates how to use this method. See also "EXAMPLES". $backtrace->skipmysubs([$package]) This method is like "skipme" except that it deletes calls to the package rather than calls from the package. Before discarding those calls, "skipme" is called. This is because usually the topmost call in the stack is to Devel::Backtrace->new, which would not be catched by "skipmysubs" otherwise. This means that skipmysubs usually deletes more lines than skipme would. "skipmysubs" was added in Devel::Backtrace version 0.06. See also "EXAMPLES" and the example "skipme.pl". $backtrace->to_string() Returns a string that contains one line for each tracepoint. It will contain the information from "Devel::Backtrace::Point"'s to_string() method. To get more information, use the to_long_string() method. Note that you don't have to call to_string() if you print a "Devel::Backtrace" object or otherwise treat it as a string, as the stringification operator is overloaded. See "EXAMPLES". $backtrace->to_long_string() Returns a very long string that contains several lines for each trace point. The result will contain every available bit of information. See "to_long_string" in Devel::Backtrace::Point for an example of what the result looks like. EXAMPLES
A sample stringification might look like this: Devel::Backtrace::new called from MyPackage (foo.pl:30) MyPackage::test2 called from MyPackage (foo.pl:28) MyPackage::test1 called from main (foo.pl:18) main::bar called from main (foo.pl:6) main::foo called from main (foo.pl:13) If MyPackage called skipme, the first two lines would be removed. If it called skipmysubs, the first three lines would be removed. If you don't like the format, you can change it: my $backtrace = Devel::Backtrace->new(-format => '%I. %s'); This would produce a stringification of the following form: 0. Devel::Backtrace::new 1. MyPackage::test2 2. MyPackage::test1 3. main::bar 4. main::foo SEE ALSO
Devel::StackTrace does mostly the same as this module. I'm afraid I hadn't noticed it until I uploaded this module. Carp::Trace is a simpler module which gives you a backtrace in string form. Devel::DollarAt comes with this distribution and is a nice application of this module. You can use it for debugging to get a backtrace out of $@. AUTHOR
Christoph Bussenius <pepe@cpan.org> If you use this module, I'll be glad if you drop me a note. You should mention this module's name in the subject of your mails, in order to make sure they won't get lost in all the spam. LICENSE
This module is in the public domain. If your country's law does not allow this module being in the public domain or does not include the concept of public domain, you may use the module under the same terms as perl itself. perl v5.10.0 2009-01-27 Devel::Backtrace(3pm)
All times are GMT -4. The time now is 08:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy