Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Removing unwanted symbols with sed Post 303030438 by Xubuntu56 on Sunday 10th of February 2019 02:44:29 PM
Old 02-10-2019
@nezabudka--I got your first code to work fine; I don't know how to employ the parameter thing

To all--I made this up myself, and it works! I know it's not elegant!
Code:
echo "blue:,*green:,*red:,*yellow" | sed 's/://g' | sed 's/*//g' | sed 's/,/, /g'

I'm assuming the double slashes before the "g" are for when you aren't substituting anything.
This User Gave Thanks to Xubuntu56 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

new lines symbols in sed?

I want to edit a huge script file using sed. How can I add the new lines symbols in the red colored places? sed -e "s/test -z "$x"/if test -z "$x" then echo -1; \n else \n/g" (1 Reply)
Discussion started by: gogogo
1 Replies

2. Shell Programming and Scripting

How to replace symbols by position using SED

Hi all, I need your help. For example I have string in file.txt: -x -a /tmp/dbarchive_NSS_20081204 -f 900 -l 1 2008/12/04 2008/12/04 So, I need to replace symbols from (for e.g.) position 26 till 33 with symbols which I have in file replace.txt And I have no idea how to do it. If... (1 Reply)
Discussion started by: nypreH
1 Replies

3. Shell Programming and Scripting

remove accents and symbols with sed

Hi, I would like to know how could I remove accentes and the symbols: º and ª of a text file with sed. Whis this command doesn't works :-( sed "s/í/i/g" filename Many thanks and sorry for my english! (7 Replies)
Discussion started by: mierdatuti
7 Replies

4. Shell Programming and Scripting

removing unwanted characters from a file

i have a file like this 1111_2222#$#$dudgfdk 11111111_343434#$#$334 1111_22222#43445667 i want to remove all those charachetrs from # how can i do this Thank in advance Saravanan (4 Replies)
Discussion started by: saravanan71184
4 Replies

5. Shell Programming and Scripting

Removing Symbols From a File like the copyright symbol

Hi guys, I have a txt file full of funny symbols like the copyright symbol and other funny ones that get in the way when trying to use sed. For example, not sure if you can read this but I have a line that looks like this: 24(9):995Â*1001 DOI: 10.1007/s11606-009-1053-2 © When I'm using... (1 Reply)
Discussion started by: joshdg
1 Replies

6. Shell Programming and Scripting

Removing unwanted tags from xml file

I have a XML file given as below: "<ProductUOMAlternativeDetails> <removetag> <UOMCode>EA</UOMCode> <numeratorForConversionToBaseUOM>1</numeratorForConversionToBaseUOM> <denominatorForConversionToBaseUOM>1</denominatorForConversionToBaseUOM> <length>0.59</length> <width>0.96</width> ... (3 Replies)
Discussion started by: vikingh
3 Replies

7. Shell Programming and Scripting

removing the words with symbols in a file in unix

I have file like below Hi iam author <br>joseph</br> in france. I live in my home <br></br> but no food. I will play footbal <br></br> but i wont play cricket. I will read all the books <br>all fiction stories</br> i hate horror stories. I want output like below Hi iam author... (3 Replies)
Discussion started by: vinothsekark
3 Replies

8. Shell Programming and Scripting

Removing extra unwanted spaces

hi, i need to remove the extra spaces in the filed. Sample: abc~bd ~bkd123 .. 1space abc~badf ~bakdsf123 .. 2space abc~bqed ~bakuowe .. 3space output: abc~bd ~bkd123 .. 1space abc~badf~bakdsf123 .. 2space abc~bqed~bakuowe .. 3space i used the following command, (2 Replies)
Discussion started by: anshaa
2 Replies

9. Shell Programming and Scripting

Removing extra unwanted spaces

hi, i need to remove the extra spaces in the 2nd field. Sample: abc|bd |bkd123 .. 1space abc|badf |bakdsf123 .. 2space abc|bqe |bakuowe .. 3space Output: abc|bd|bkd123 abc|badf|bakdsf123 abc|bqe|bakuowe i used the following command, (9 Replies)
Discussion started by: anshaa
9 Replies

10. UNIX for Dummies Questions & Answers

sed command for removing symbols

Hi I am trying to remove all the symbols in a file (testfile1) and using the below command to do that. Its not working for me. Can you help me on what is wrong with below script? I want to retain only alphabets in a file and remove all the symbols like *:.+= etc sed 's/^.//g' testfile1 > testfile2 (4 Replies)
Discussion started by: sandeepcm
4 Replies
DBSYM(8)						    BSD System Manager's Manual 						  DBSYM(8)

NAME
dbsym -- copy kernel symbol table into db_symtab space SYNOPSIS
dbsym [-v] [-b bfdname] kernel DESCRIPTION
dbsym is used to copy the symbol table in a newly linked kernel into the db_symtab array (in the data section) so that the ddb(4) kernel debugger can find the symbols. This program is only used on systems for which the boot program does not load the symbol table into memory with the kernel. The space for these symbols is reserved in the data segment using a config option like: options SYMTAB_SPACE=72000 The size of the db_symtab array (the value of SYMTAB_SPACE) must be at least as large as the kernel symbol table. If insufficient space is reserved, dbsym will refuse to copy the symbol table. To recognize kernel executable format, the -b flag specifies BFD name of kernel. If the -v flag is given, dbsym will print out status information as it is copying the symbol table. Note that debugging symbols are not useful to the ddb(4) kernel debugger, so to minimize the size of the kernel, one should either compile the kernel without debugging symbols (no -g flag) or use the strip(1) command to strip debugging symbols from the kernel before dbsym is used to copy the symbol table. The command strip -d netbsd will strip out debugging symbols. SEE ALSO
strip(1), ddb(4) BSD
November 9, 2001 BSD
All times are GMT -4. The time now is 09:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy