Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To replace '(' and ')' symbol using tr or sed Post 302642133 by thomasraj87 on Thursday 17th of May 2012 03:28:49 AM
Old 05-17-2012
To replace '(' and ')' symbol using tr or sed

I am trying to replace '(' and ')' symbol with nul text using tr command. But i am not able to get the expected output . Please help

Code:
# cat test.txt
155170816-(75767Mb)

#
Code:
 tr '(' '' < test.txt
155170816-(75767Mb)

Code:
# tr ')' '' < test.txt
155170816-(75767Mb)
#


I want the o/p as

Code:
155170816-75767Mb

Anyone please help. How can i do this using tr or sed.

Last edited by Scrutinizer; 05-17-2012 at 04:47 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace a symbol with new line

i have file in which i want to replace a char with new line please help me out (1 Reply)
Discussion started by: RahulJoshi
1 Replies

2. Linux

Replace cloud symbol with single quotes

Dear Experts My source file contains the symbol cloud (☁). How do i replace this ☁ symbol whose Unicode value is 2601 in linux file with single quotes ? Any help will be much appreciated. Many thanks (4 Replies)
Discussion started by: pklcnu
4 Replies

3. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

4. Shell Programming and Scripting

Spanish accent symbol removed by sed

Hello All in a text file I have to replace some numeric code by a string. This is an exemple of the file: 000000001 LDR L ^^^^^nam^^2200169Ia^45e0 000000001 008 L 100604s9999^^^^xx^^^^^^^^^^^^000^0^und^d 000000001 022 L $$a0365-6675 000000001 090 L $$aBMA 1934-1937. 000000001 245... (1 Reply)
Discussion started by: ldiaz2106
1 Replies

5. Shell Programming and Scripting

replace multiple existence of : symbol with one

Infile Outfile (3 Replies)
Discussion started by: dvah
3 Replies

6. Shell Programming and Scripting

How to replace quote symbol(") and dot(.) with some other values!!

Hi , I have below input file 1.order number is useful. 2.vendor_id is produced. 3.the vandor name is "malawar". I want output file like 1. order number is useful. 2. vendor_id is produced. 3. the vandor name is VmalawarV. in input file line number 1.order number there is no... (4 Replies)
Discussion started by: vinothsekark
4 Replies

7. Shell Programming and Scripting

remove caret (^) symbol from pattern using sed

Hi, I am trying to remove the caret symbol from a bash variable. This is the variable: var="GOTAN^TOK^B"and this is the code I am trying to use to remove the caret symbol: nocarrot=`echo $var | sed -e 's/^/_/g'`This is the output intended (but not acheived with the above function):... (3 Replies)
Discussion started by: goodbenito
3 Replies

8. Shell Programming and Scripting

Replace trailing whitespaces with pipe symbol using perl

I want to replace the whitespace with Pipe symbol to do a multiple pattern matching for the whole text "mysqld failed start" and same as for other text messages Below are the messages stored in a file seperate by whitespace mysqld failed start nfsd mount failed rpcbind failed to start for... (6 Replies)
Discussion started by: kar_333
6 Replies

9. Shell Programming and Scripting

Remove/replace the very first character/symbol match

cat file.txt file 1123.x July 23:222 /cd/hh2/k39/ss2/f7d8d9d8e6r5t4s/dd2/e/s7a/s7a2afa5017d8b975-1.7-1395610245-b22e19bbc477b134 i wish to only extract out the 1.7 (anything within the first - -) i try to look for the sed command under match the first occurence of pattern but out of luck, my... (6 Replies)
Discussion started by: ctphua
6 Replies

10. Shell Programming and Scripting

How to replace the first and last character which is pipe symbol in all files within a folder?

with in my files i have the data like this, starting with a pipe and ending the line with a pipe. all i want is to replace the first and last pipe , remove those trying to use following sed command, but it is only showing on the screen the entire data of the file as if it removed, but when i... (4 Replies)
Discussion started by: cplusplus1
4 Replies
LATEXMLFIND(1p) 					User Contributed Perl Documentation					   LATEXMLFIND(1p)

NAME
"latexmlfind" finds interesting things in LaTeXML generated XML. SYNOPSIS
latexmlfind [options] xmlfile Options: --symbol=symbol finds equations where the symbol appears. --unknown=symbol finds equations where the unknown symbol appears (ie role=UNKNOWN). --possiblefunction=symbol finds equations where symbol is possibly used as a function. --label=symbol finds objects with the given label. --refnum=symbol finds objects with the given refnum (reference number). --quiet suppress messages (can repeat) --verbose more informative output (can repeat) --VERSION show version number. --help shows help message. OPTIONS AND ARGUMENTS
latexmlfind is useful for finding objects within an XML file generated by LaTeXML. --output=outputfile Specifies the output file; by default the XML is written to stdout. --unknown=symbol Finds equations where the unknown symbol appears. --possiblefunction=symbol Finds equations where symbol is possibly used as a function. --label=label Finds objects (sections, equations, whatever) labeled by the given label. --refnum=refnum Finds objects (sections, equations, whatever) with the given reference number. --quiet Reduces the verbosity of output during processing, used twice is pretty silent. --verbose Increases the verbosity of output during processing, used twice is pretty chatty. Can be useful for getting more details when errors occur. --VERSION Shows the version number of latexmlfind.. --help Shows this help message. SEE ALSO
latexml, LaTeXML perl v5.10.1 2009-06-11 LATEXMLFIND(1p)
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy