Sponsored Content
Top Forums Shell Programming and Scripting Remove double char occurences Post 302943479 by rlopes on Friday 8th of May 2015 08:52:26 PM
Old 05-08-2015
Remove double char occurences

I have a file with random characters where every time a char occurs twice, one occurrence must be removed.

Eg.

Code:
asjkdhaSSd

Must become:

Code:
asjkdhaSd

Anybody has a SED script in mind to do it?

Last edited by Don Cragun; 05-08-2015 at 10:44 PM.. Reason: Change Bold tags to CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Escape Char for double quote

Hi, what is the escape char for " in shell script. following way i want to write file using echo command echo "LOAD DATA infile '&1' APPEND INTO TABLE dummy_table FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - single quote and double quote and single quote - gives error here... (1 Reply)
Discussion started by: navik_pathak
1 Replies

2. Shell Programming and Scripting

Help needed to remove a char from a specified sub-string

Hi! I'm having trouble usind sed to remove the char ' from within a database's varchar register's sql. For example, on the following sql: INSERT INTO patrimonio_municipal.patrimonio_municipal_airc_tmp Values('|Estação Elevatória|',|16723|,'|Grandes Reparações|', '|2010-03-26... (3 Replies)
Discussion started by: cremat0rio
3 Replies

3. Shell Programming and Scripting

can I remove the first char using AWK?

Hi everyone, suppose that I have the following line: #test your knowledge can I use AWK to print the word "test" only? without the #? what should I change to this: awk '{print $1}' thanks in advance guys (2 Replies)
Discussion started by: Abdulelah
2 Replies

4. Shell Programming and Scripting

Remove char after Colon

Hi guys, This is my input 2735:<7001> 34 789 701 2 2774:<7001> 34 789 701 2 How to delete characters after colon : Including colon : too ? My output should... (3 Replies)
Discussion started by: gowrishankar05
3 Replies

5. UNIX Desktop Questions & Answers

Help me to remove junk char

I wanted to remove junk char in my csv. :mad: Input file format: "17","9986782190","0","D","2" "17","9900918331","0","D","2" "13","9986782194","0","A","2" Output file format 9986782190 9900918331 9986782194 And one more thing all the time "13"," this will be different Ex: . (2 Replies)
Discussion started by: Siddartha
2 Replies

6. Shell Programming and Scripting

How to remove the # char form a line?

Hi, my file has below details and I want remove the # char from only specific line. #TEST:00:START #TEST1:01:INPROCESS #TEST2:02:ABOUTTO #TEST3:03:COMP i.e if want remove the # from 2nd line then file to be updated as #TEST:00:START TEST1:01:INPROCESS #TEST2:02:ABOUTTO... (6 Replies)
Discussion started by: sandyrajh
6 Replies

7. Programming

Double to const char conversion

Dear all, I am using C and ROOT for programming. And I need to incorporate following in my code. char *fps=NULL; int dec=0,sign=0; float mean = h1->GetMean(1); //0.001298 fps= fcvt(mean,6 , &dec, &sign); I need to provide this mean as const char to some other function to get... (8 Replies)
Discussion started by: emily
8 Replies

8. UNIX for Dummies Questions & Answers

Remove char if not a number

I need to write a BASH script that takes a 2 character string and removes the second character if it is not a digit e.g. If the string is numberical value >9 e.g. string1 = '34' then leave string1 = '34'. However if the string is <10 e.g. string1 = '3X' then remove the second char (which... (7 Replies)
Discussion started by: millsy5
7 Replies

9. UNIX for Advanced & Expert Users

Perl regex problem on strings with several occurences of one char

Hi all, i have the following line in a record file : retenu=non demande=non script=#vtbackup /path=/save/backup/demande position=140+70 and i want to use Perl regex to have the following output key : "retenu" value : "non" key : "demande" value "non" key : "script" value :... (2 Replies)
Discussion started by: Fundix
2 Replies

10. 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
ALDO(1) 						      General Commands Manual							   ALDO(1)

NAME
aldo - A fully console morse code trainer written in ISO C++. SYNOPSIS
aldo DESCRIPTION
Aldo is developed from scratch in ISO C++ using GNU C++ Standard Library and libao (www.xiph.org/ao). It is a morse code learning tool which provides four type of training methods: Blocks Identify blocks of random characters played in morse code. Koch Two morse characters will be played at full speed (20wpm) until you'll be able to identify at least 90 percent of them. After that, one more character will be added, and so on. File Identify played characters generated from a file. Callsign Identify random callsigns played in morse code. NOTES
The "Device" option under the keyer depends on the particular driver. The "default" setting picks the default sound device. This option may be used to pick a different soundcard than the default one. For alsa, it is "hw:<card>,<device>", where the card and device number are the particular hardware devices. The default is generally "hw:0.0". Generally 0 is the first card, 1 is the second, etc. Some sound cards may have multiple output devices, the device picks the particular one. For oss, sun, and aixs, it is the device name, like /dev/dsp. For esd, it is the host name, like "whizbang.com:555". It is not used on any other drivers. AUTHOR
This manual page was written by Giuseppe Martino <denever@users.sf.net>, for the Debian project (but may be used by others). Nov 20, 2004 ALDO(1)
All times are GMT -4. The time now is 10:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy