Sponsored Content
Full Discussion: Program to remove a pattern
Top Forums UNIX for Advanced & Expert Users Program to remove a pattern Post 302208958 by arsheshadri on Wednesday 25th of June 2008 11:45:32 AM
Old 06-25-2008
Program to remove a pattern

Hi,

I want to remove all occurances of a character which follows a ^ symbol.

For ex:

This is a Test ^H^@^@^@^@^@^@ File used in VI. ^@^@^B^VDM-BM-$|M-^_M-F^AM-

In the above example, I should remove all characters which follows a ^.
(^H ^@ ^B ^V etc) and It should print This is a Test File used in VI

Is there a program or a cmd which I can use to do this?

Thanks & Regards
Sheshadri
 

10 More Discussions You Might Find Interesting

1. Solaris

How to remove sudo program

How to completely uninstall sudo program? Thank u in advance (1 Reply)
Discussion started by: unitipon
1 Replies

2. Shell Programming and Scripting

How to remove a file with a particular pattern

Hi I have a list of files in a folder.I have a search pattern in the file name and i want to remove the file with that pattern.How can that be made List of files xxxxx.ID1.yyyyy.zzzzz yyyy.ID2.bbbbb.kkkkk xxxxx.ID1.yyyyy.zzzzz yyyy.ID4.bbbbb.kkkkk xxxxx.ID1.yyyyy.zzzzz... (2 Replies)
Discussion started by: sparks
2 Replies

3. Programming

how to check and remove leading zeroes from the buffer using c program

Helo , I m writing small module of c.on RHEL 4 I have one buffer (for e.g. buffer = "002" now I want to check whethere buffer contains leading zeroes and if it contains leading zeroes then I want to remove all leading zeroes ( i.e. if buffer = "002" then I want to make buffer = "2") how... (1 Reply)
Discussion started by: amitpansuria
1 Replies

4. Linux

Perl program to print previous set of lines once a pattern is matched

Hi all, I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Discussion started by: kaav06
2 Replies

5. Shell Programming and Scripting

Running a program multiple times to search pattern and assign structure

Hi all, I have a big file (n.txt) with following pattern: ATOM 1 N SER A 1 122.392 152.261 138.190 1.00 0.00 N ATOM 2 CA SER A 1 122.726 151.241 139.183 1.00 0.00 C TER ENDMDL ATOM 1 N SER A 1 114.207 142.287 135.439 1.00 0.00 ... (3 Replies)
Discussion started by: bioinfo
3 Replies

6. Shell Programming and Scripting

Remove last pattern

I have a file with entries below. domain1.com.http: domain2.com.49503: I need this to be sorted like below. ie remove the patten after the last right-hand side . (dot). domain1.com domain2.com (7 Replies)
Discussion started by: anil510
7 Replies

7. Shell Programming and Scripting

Search a pattern in a line and remove another pattern

Hi, I want to search a pattern in a text file and remove another pattern in that file. my text file look like this 0.000000 1.970000 F 303 - 1.970000 2.080000 VH VH + 2.080000 2.250000 VH VH + 2.250000 2.330000 VH L - 2.330000 2.360000 F H + 2.360000 2.410000 L VL - 2.410000 ... (6 Replies)
Discussion started by: sreejithalokkan
6 Replies

8. UNIX for Advanced & Expert Users

How to remove a char before a pattern?

Hi I have a file where i want to remove a char before a specific pattern. exp: CREATE TABLE ( A, B, C, ----comma needs to be removed )AS SELECT A, B, C, ----comma needs to be removed FROM TABLE. So i want to delete the comma(,) after the C both ways.Pattern can be... (11 Replies)
Discussion started by: raju2016
11 Replies

9. Shell Programming and Scripting

How to remove the lines with this pattern?

Hello everyone, I have a sample data like this: Glyma.10G051100 Glyma.02G036000 89.91 228 23 0 1 228 1 228 1e-78 294 Glyma.10G051100 Glyma.09G023700 87.28 228 29 0 1 228 1 228 1e-68 261 Glyma.10G285200 Glyma.20G103800 96.33 1663 55 4 1 1657 1 1663 0.0 2728 Glyma.10G285200 Glyma.05G093700 95.02... (2 Replies)
Discussion started by: nengcheng
2 Replies

10. UNIX for Beginners Questions & Answers

awk to remove pattern and lines above pattern

In the awk below I am trying to remove all lines above and including the pattern Test or Test2. Each block is seperated by a newline and Test2 also appears in the lines to keep but it will always have additional text after it. The Test to remove will not. The awk executed until the || was added... (2 Replies)
Discussion started by: cmccabe
2 Replies
Test::TempDir::Factory(3pm)				User Contributed Perl Documentation			       Test::TempDir::Factory(3pm)

NAME
Test::TempDir::Factory - A factory for creating Test::TempDir::Handle objects. SYNOPSIS
my $f = Test::TempDir::Factory->new; my $d = $f->create; $d->empty; # ... $d->cleanup DESCRIPTION
This class creates Test::TempDir::Handle objects with the right "dir" parameter, taking care of obtaining locks, creating directories, and handling fallback logic. ATTRIBUTES
lock Whether or not to enable locking. Defaults to true. lock_opts A hash reference to pass to File::NFSLock. Defaults to "NONBLOCKING" lock_attempts How many times to try to create and lock a dir. Defaults to 2. dir_name The directory under "t_dir" to use. Defaults to "tmp" t_dir Defaults to "t" use_subdir Whether to always use a temporary subdirectory under the temporary root. This means that with a "success" cleanup policy all failures are retained. When disabled, "t/tmp" will be used directly as "temp_root". Defaults to true. subdir_template The template to pass to "tempdir". Defaults to "File::Temp::TEMPXXX". handle_class Defaults to Test::TempDir::Handle. verbose Whether or not to "carp" diagnostics when falling back. If you subclass this factory and add a "logger" method a la MooseX::Logger then this parameter is ignored and all messages will be "warn"ed on the logger. METHODS
create Create a Test::TempDir::Handle object with a proper "dir" attribute. perl v5.10.0 2009-08-10 Test::TempDir::Factory(3pm)
All times are GMT -4. The time now is 06:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy