How to use sed or another command line function to remove . between characters

ehr

I have a document structured with columns that look as follows:

1 151.065 Jp01.151065q 3.090 0

I want to remove the periods between the numbers. I have been trying to use sed to do so. However, either the periods remain after I try or the entire document disappears? I am confused about how to just remove those characters.

HatLess

I believe your issue may be that you are not escaping the period leaving a regex that matches everything and consequently, deletes everything.

Using sed

$ sed '/\.//g' file
1 151065 Jp01151065q 3090 0

Using tr

$ tr -d '.' <file
1 151065 Jp01151065q 3090 0

Using awk

$ awk '{gsub(/\./,"")}1' file
1 151065 Jp01151065q 3090 0

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to use sed to replace a whole line with another one with characters in it

How to remove everything between two characters with SED?

How to remove everything between two characters with sed?

How to use unicode characters in Windows command line?

How to use sed or any other command to remove all the lines between stream

How to remove characters/strings/patterns between, before and after some other characters/strings/patterns in a fasta file using a Ubuntu command line

How do I use an ORACLE REGEX function to remove all leading and trailing line break characters and spaces?

How to use python in command line in another directory

How can I properly use sed to remove text outside "" characters?

How to use sed to remove some characters from file?

How to use 'sed' to add characters to beginning of line in a file

How to remove characters from file names using command line?

Use sed to remove part of a line

How to use Sed to replace all characters in between colons

sed remove special characters and spaces in line

sed find line in file and remove characters

Use sed to insert another sed command in a file

Remove characters between two patterns using sed

Remove string between two space characters with sed

How to use ! in the sed command?

How to use sed to copy file content to another at a specific line number

How to count the number of characters in a command line argument by using and creating a function

How to use sed to remove dots between 2 patterns

How to find a text between two characters and replace it by a text between another two characters of a line in notepad++?

use bash function in sed command

How to use a string in Chinese characters as input for another command in bash?

How to remove # in front of a line with sed?

Use sed to remove characters in front of matching keywords

sed command to replace a string with special characters with another string with special characters