Sponsored Content
Full Discussion: pattern search with sed
Homework and Emergencies Homework & Coursework Questions pattern search with sed Post 302548758 by bhrat kapoor on Friday 19th of August 2011 08:25:15 AM
Old 08-19-2011
first statement : sed -e s/\"\$hi/\$hi/ \ working fine replacing the patten in test.out file .
but in second one : test.res file contain space between " and / and i want to replace it to space and / ....please help

-bhrat
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SED Search Pattern and Replace with the Pattern

Hello All, I have a string "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031", and I just want to extract LLSV1, but I dont get the expected result when using the sed command below. # echo "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031" | awk '{print... (4 Replies)
Discussion started by: racbern
4 Replies

2. Shell Programming and Scripting

Multiline pattern search using sed or awk

Hi friends, Could you please help me to resolve the below issue. Input file :- <Node> <username>abc</username> <password>ABC</password> <Node> <Node> <username>xyz</username> <password>XYZ</password> <Node> <Node> <username>mnp</username> ... (3 Replies)
Discussion started by: haiksuresh
3 Replies

3. Shell Programming and Scripting

unable to use new line in sed search pattern.

hi , my lilo.conf is as shown below : prompt default=Primary read-only image=/boot/bzImage label=Primary root=/dev/md0 append="reboot=t md=0 ip=off panic=5 quiet console=ttyS0,115200n81" read-only image=/boot/bzImage label=Recover root=/dev/sda3 ... (7 Replies)
Discussion started by: success
7 Replies

4. Shell Programming and Scripting

Awk/Sed: Search Pattern from file and Print

Hi, I want to search for patterns (from a file) in a file and print the line matching the patterns and the line before it. I have to search for 100s of patterns from a file. Any help with AWK or Sed. Thanks! (2 Replies)
Discussion started by: saint2006
2 Replies

5. Shell Programming and Scripting

sed: how to limit pattern search to first instance only

I need to reduce a file's size below 50MB by deleting chucks of text. The following sed does this. sed '/^begpattern/,/endpattern/d' myfile However, it's possible that the file size can get below 50MB by just deleting the first instance of the pattern. How do I code that into sed? Or can awk... (8 Replies)
Discussion started by: mariod1049
8 Replies

6. UNIX for Dummies Questions & Answers

One liner pattern search with awk/sed/grep

I have an array containing bunch of characters. I have to check this array for specific character and if "Not Found than" use a goto statement to go to USAGE set options = (A B C D E F) @ i = 0 while ($i <= ${#options}) if ($options != "F" || $options != "D") then goto USAGE endif @... (1 Reply)
Discussion started by: dixits
1 Replies

7. Shell Programming and Scripting

Search pattern within file using sed..

Hi, Could someone help me in figuring out a way using which i can search for a specific pattern. Eg. JUSTDOIT..I have to print just the word "DO" from "JUSTDOIT" If the same word JUSTDOIT is print n number of times (6 Replies)
Discussion started by: sankasu
6 Replies

8. Shell Programming and Scripting

sed search pattern and delete lines

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

9. Shell Programming and Scripting

How to use sed to search a particular pattern in a file backward after a pattern is matched.?

Hi, I have two files file1.txt and file2.txt. Please see the attachments. In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies

10. Shell Programming and Scripting

sed - Search and replace within pattern

Hi Guys! Unix newbie here! Have a requirement for which I have been scouting the forums for a solution but has been out of luck so far :( I have a file which contains the following:- TEST1|TEST2|"TEST3|1@!2"|TEST5 My sed command should result in either one the following output:-... (6 Replies)
Discussion started by: hishamzz
6 Replies
Devel::Cover::Test(3pm) 				User Contributed Perl Documentation				   Devel::Cover::Test(3pm)

NAME
Devel::Cover::Test - Internal module for testing VERSION
version 0.89 METHODS
new my $test = Devel::Cover::Test->new($test, criteria => $string) Constructor. "criteria" parameter (optional, defaults to "statement branch condition subroutine") is a space separated list of tokens. Supported tokens are "statement", "branch", "condition", "subroutine" and "pod". More optional parameters are supported. Refer to "get_params" sub. shell_quote my $quoted_item = shell_quote($item) Returns properly quoted item to cope with embedded spaces. perl my $perl = $self->perl() Returns absolute path to Perl interpreter with proper -I options (blib-wise). test_command my $command = $self->test_command() Returns test command, made of: absolute path to Perl interpreter Devel::Cover -M option (if applicable) test file test file parameters (if applicable) cover_command my $command = $self->cover_command() Returns test command, made of: absolute path to Perl interpreter absolute path to cover script cover parameters test_file my $file = $self->test_file() Returns absolute path to test file. test_file_parameters my $parameters = $self->test_file_parameters() Accessor to test_file_parameters property. cover_gold my ($base, $v) = $self->cover_gold; Returns the absolute path of the base to the golden file and the suffix version number. $base comes from the name of the test and $v will be $] from the earliest perl version for which the golden results should be the same as for the current $] run_command $self->run_command($command) Runs command, most likely obtained from "test_command" sub. BUGS
Huh? LICENCE
Copyright 2001-2012, Paul Johnson (paul@pjcj.net) This software is free. It is licensed under the same terms as Perl itself. The latest version of this software should be available from my homepage: http://www.pjcj.net perl v5.14.2 2012-06-15 Devel::Cover::Test(3pm)
All times are GMT -4. The time now is 04:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy