Sponsored Content
Full Discussion: sed non ascii value remove
Top Forums Shell Programming and Scripting sed non ascii value remove Post 303043440 by RudiC on Tuesday 28th of January 2020 08:49:23 PM
Old 01-28-2020
ascii is not found in the wctype character classes, nor mentioned in e.g. man regex.

What characters do you want to remove? Strange locales'? Be aware that control chars 0x00 - 0x1F (including e.g. <TAB> ) are in the ascii set as well...

Last edited by RudiC; 01-28-2020 at 10:01 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed remove

anyone out there knows how to remove pattern <random string> use sed? (6 Replies)
Discussion started by: jamwong
6 Replies

2. Shell Programming and Scripting

sed over writes my original file (using sed to remove leading spaces)

Hello and thx for reading this I'm using sed to remove only the leading spaces in a file bash-280R# cat foofile some text some text some text some text some text bash-280R# bash-280R# sed 's/^ *//' foofile > foofile.use bash-280R# cat foofile.use some text some text some text... (6 Replies)
Discussion started by: laser
6 Replies

3. Shell Programming and Scripting

How to tell SED to emit output in 8-bit ASCII only?

I have to mangle some "plain ASCII" text file (i.e. 8 bits/characters where the text DOES contain characters like Umlauts and accented characters from the upper 7-bits range, i.e. with hex codes in ). For this I am trying to use SED which I downloaded as part of cygwin package (yes, I am doing... (0 Replies)
Discussion started by: mmo
0 Replies

4. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

5. Shell Programming and Scripting

sed to remove

Hello I have a file with records...The records have several lines and have start and end born... This is a template: 000000001 LDR L ^^^^^nam^^2200325Iia^45e0 000000001 022 L $$a0081-3397 000000001 041 L $$aSPA 000000001 088 L $$aJ.E.N. 551 000000001 090 L $$aINFORMES JEN... (22 Replies)
Discussion started by: ldiaz2106
22 Replies

6. Shell Programming and Scripting

remove pattern with sed

Hi, i want to remove a certain pattern when i type pwd. pwd will look like this: ..../....../....../Pat_logs/..../....../...../...... the dotted lines are just random directory names, i want it to remove the "Pat_logs/...../....../....../" part so for example: ... (5 Replies)
Discussion started by: a27wang
5 Replies

7. Shell Programming and Scripting

Remove some special ascii character

Hello I have this special caracter after retreving rows from sql server: "....spasses: • Entrem al valort 6050108002811 • El donem..." I would like a sed command to remove it..or just know it's ascii code in order to replace it into my sql sentence.. Hope some one knows how to do that.... (7 Replies)
Discussion started by: ldiaz2106
7 Replies

8. Shell Programming and Scripting

Grep to remove non-ASCII characters

I have been having an encoding problem that I need to solve. I have an 4-column tab-separated file: I need to remove all of the lines that contain the string 'vis-à-vis' achiever-n vis-à-vis+ns-j+vp oppose-v 1 achiever-n vis-à-vis+ns-the+vg assess-v 1 administrator-n ... (4 Replies)
Discussion started by: owwow14
4 Replies

9. Shell Programming and Scripting

Convert Hex to Ascii in a Ascii file

Hi All, I have an ascii file in which few columns are having hex values which i need to convert into ascii. Kindly suggest me what command can be used in unix shell scripting? Thanks in Advance (2 Replies)
Discussion started by: HemaV
2 Replies

10. Shell Programming and Scripting

Need to remove first and last character using sed

Hi I have file in below format. How i can remove the first and lost comma from this below file ,001E:001F,,,02EE,0FED:0FEF, I need output has below 001E:001F,,,02EE,0FED:0FEF (6 Replies)
Discussion started by: ranjancom2000
6 Replies
wctype(3)						     Library Functions Manual							 wctype(3)

NAME
wctype - Gets a handle to classify wide characters LIBRARY
Standard C Library (libc) SYNOPSIS
#include <wctype.h> wctype_t wctype( const char *property); The following prototype for wctype() does not conform to current industry standards and is supported only for backward compatibility: #include <wchar.h> wctype_t wctype( char *property); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: wctype(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to a string that identifies a character class, or property. DESCRIPTION
The wctype() function obtains a handle for valid property names for wide characters, as defined in the current locale. The handle can then be used as the wc_prop parameter in a subsequent call to the iswctype() function to check whether a wide character has this property. (See the iswctype(3) reference page.) Values returned by the wctype() function are valid until the setlocale() function modifies the value of the LC_CTYPE environment variable. The property parameter can have a value equal to one of the basic character classes or to any other character class that is defined for a locale. The characters included in each class are specified in the locale definition file (see the localedef(1) and locale(4) reference pages for more information). The basic character classes are as follows: A combination of the classes alpha and digit. Alphabetic (letter) characters. This class automatically includes characters in the upper and lower classes. Blank char- acters, such as the space or tab character. Control characters. This class does not include characters in the alpha or print class. Numeric digit characters. This class includes the following characters: 0 1 2 3 4 5 6 7 8 9 Graphic characters for printing. This class does not include characters in the space or cntrl class but includes all characters in the alpha, digit, and punct classes. Lowercase characters. This class does not include characters in the cntrl, digit, punct, or space class. At a minimum, the lower class includes the 26 lowercase US-ASCII characters. These are: a b c d e f g h i j k l m n o p q r s t u v w x y z Print characters. This class includes characters in the graph and space classes but does not include characters in the cntrl class. Punctuation characters. This class does not include characters in the space, alpha, digit, or cntrl class. Space characters. At a minimum, this class includes the space, form-feed, newline, carriage-return, tab, and vertical-tab characters. Uppercase characters. At a minimum, this class includes the 26 uppercase US ASCII characters. These are: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Hexadecimal characters. This class includes the following characters: 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f For the list of supplemental properties that can be defined in Unicode locales, see the locale(4) reference page. On Tru64 UNIX systems, Unicode character properties are defined only in locales whose names end in .UTF-8. RETURN VALUES
On successful completion, the wctype() function returns a value of type wctype_t, which is a handle for valid property names in the current locale. If the property parameter specifies a character class that is not valid for the current locale, the function returns the value 0 cast to wctype_t. RELATED INFORMATION
Commands: localedef(1) Files: locale(4) Functions: ctype(3), iswctype(3), setlocale(3), towupper(3), wctrans(3) delim off wctype(3)
All times are GMT -4. The time now is 02:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy