Sponsored Content
Full Discussion: How to grep � symbol?
Top Forums Shell Programming and Scripting How to grep � symbol? Post 303033487 by baris35 on Saturday 6th of April 2019 09:51:56 AM
Old 04-06-2019
Hello,
I am back again with the same question.
I am able to detect if it has U+FFFD inside any file but do not know which files have got this issue.

I run:
Code:
printf '%b' "$(printf '\\U%x' {128..131})" | grep -oP "[^\x00-\x7F]"

output:
Code:
�
�
�
�

how may I find it?
PS:
Code:
printf '%b' "$(printf '\\U%x' {128..131})" | grep -HoP "[^\x00-\x7F]"

gives below output:
Code:
(standard input):�
(standard input):�
(standard input):�
(standard input):�


Code:
printf '%b' "$(printf '\\U%x' {128..131})" | grep -loP "[^\x00-\x7F]"

gives only one line output:
Code:
(standard input):�

thank you
Boris

Last edited by baris35; 04-06-2019 at 10:59 AM.. Reason: extra tests done
 

10 More Discussions You Might Find Interesting

1. Programming

c++ unresolved symbol

I have this problem: # make gcc -g -D_REENTRANT -DDISABLE_MJPEG=1 -I. -o encmain.o -c encmain.cc ld: 0711-317 ERROR: Undefined symbol: std::string::_Rep::_S_max_size collect2: ld returned 8 exit status but from /usr/local/include/g++v3/bits/basic_string.h : namespace... (0 Replies)
Discussion started by: thalex
0 Replies

2. Programming

Symbol files

How to generate the symbol file for "C" program which will help me in analysing the core dump. Can any one suggest me the tools to use. I don't whether the gcc has the option to generate symbol file while generating the object code. (1 Reply)
Discussion started by: jkolla
1 Replies

3. UNIX for Dummies Questions & Answers

The > symbol

Hi guys, Im new to unix; I have a problem at hand. Somehow at the terminal, I lost the command prompt, instead I get a ">" symbol. Anything I type in does me no good. What do you recommend? Thank you for your help. (3 Replies)
Discussion started by: csb
3 Replies

4. UNIX for Dummies Questions & Answers

grep problem with the ^ symbol, help needed please.

Hello I am new to this forum and have been perplexed by this issue for the last hour of my life, I've tried to search everywhere for a solution to my syntax error, but here is my code. grep -wvnf 'noise.dat' sample.out | sort output: 4:Java Swing 5:Swing Java 6:Software Requirements... (2 Replies)
Discussion started by: Gvsumrb
2 Replies

5. Shell Programming and Scripting

how to have ENTER after each symbol.

I want to know script for Input file : 123456789 outputfile : 1 2 3 4 5 6 7 8 9 now please how can generalize it like i want output : 123 456 789 (5 Replies)
Discussion started by: sparkriver
5 Replies

6. Solaris

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

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

7. UNIX for Dummies Questions & Answers

grep line for string up to symbol

Hi, I would like to extract a pattern from a line. The first two characters will always be the same in this pattern, but the proceeding numbers will not be, and the pattern will always be 6 characters long. I would like to get the entire pattern up to a certain symbol, in this case, a period. ... (3 Replies)
Discussion started by: goodbenito
3 Replies

8. Programming

Undefined Symbol

When I try to link a .so file I get the undefined symbol error. Though I have the library file in my system. The compile and linking commands used are as follows g++ -m64 -g -Wall -I./include -c dxl_sample.c g++ -o firstprogram -m64 -g -Wall -I./include -Bdynamic... (1 Reply)
Discussion started by: Ranadeep Ghosal
1 Replies

9. UNIX for Advanced & Expert Users

Undefined Symbol

When I try to link a .so file I get the undefined symbol error. Though I have the library file in my system. The compile and linking commands used are as follows g++ -m64 -g -Wall -I./include -c dxl_sample.c g++ -o firstprogram -m64 -g -Wall -I./include -Bdynamic... (1 Reply)
Discussion started by: Ranadeep Ghosal
1 Replies

10. Shell Programming and Scripting

On £ symbol

Hi All, How do i represent £ symbol in unix and how to retain £ symbol in file. Thanks in Advance (3 Replies)
Discussion started by: HemaV
3 Replies
Locale::Codes::LangExt(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangExt(3pm)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangExt(3pm)
All times are GMT -4. The time now is 01:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy