06-26-2008
Quote:
Originally Posted by
arsheshadri
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
Instead of above..solution for the following will help me.
I have to eliminate all characters between ^ and a space in a file.
Following lines -
Test ^ H^@^@^@^@^@^@^B^VDM-BM-$|M-^_M-F^AM- File1
Test^H^@^@^@^@^@^F^A^X^@^SM-s^TM-3M-G^A File2
Should be printed as below
Test File1
Test File2
I used sed '/^/,/ /d' command, but it is not working.
Please help me out.
Thanks & Regards
Sheshadri
10 More Discussions You Might Find Interesting
1. Solaris
How to completely uninstall sudo program?
Thank u in advance (1 Reply)
Discussion started by: unitipon
1 Replies
2. Shell Programming and Scripting
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
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
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
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
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
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
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
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
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
LEARN ABOUT MOJAVE
widget_toolbar
widget_toolbar(n) widget::toolbar Megawidget widget_toolbar(n)
__________________________________________________________________________________________________________________________________________________
NAME
widget_toolbar - widget::toolbar Megawidget
SYNOPSIS
package require Tcl 8.4
package require Tk 8.4
package require widget ?3.0?
package require widget::toolbar ?1.0?
widget::toolbar pathname ?options?
getframe
add ?item? ?args?
delete item1 ?item2? ?...?
itemcget symbol option
itemconfigure symbol ?args?
items ?pattern?
remove ?-destroy? item1 ?item2? ?...?
_________________________________________________________________
DESCRIPTION
This package provides a toolbar megawidget (snidget). It makes use of the Tile/Ttk themed widget set.
widget::toolbar pathname ?options?
getframe
add ?item? ?args?
delete item1 ?item2? ?...?
itemcget symbol option
itemconfigure symbol ?args?
items ?pattern?
remove ?-destroy? item1 ?item2? ?...?
WIDGET OPTIONS
-ipad
-pad
-separator
ITEM OPTIONS
-pad
-separator
-sticky
-weight
EXAMPLE
package require widget::toolbar ; # or widget::all
set t [widget::toolbar .t]
pack $t -fill x -expand 1
$t add button [button .b -text foo]
$t add separator -pad {2 4}
$t add button [button .c -text bar]
KEYWORDS
megawidget, snit, widget
widget 3.0 widget_toolbar(n)