Sponsored Content
Top Forums Shell Programming and Scripting Equivalence classes don't work Post 303042090 by jim mcnamara on Friday 13th of December 2019 10:02:04 PM
Old 12-13-2019
I was not clear. You thought your locale was messed up somehow, so I started at the beginning to debug it.
Looks okay. Next, tr has problems with equivlence classes
Code:
[aªáàâãäå]

This is the long form of an equivalence class. Try it (use whatever letter is handy)
Code:
echo "aªáàâãäå" | sed 's/[aªáàâãäå...]/a/g'

On Linux this fails for me:
Code:
$ echo "aªáàâãäå" | sed 's/[=a=]/x/g'
xªáàâãäå

The tr man page I have:
Quote:
Equivalence classes

The syntax [=C=] expands to all of the characters that are equivalent to C, in no particular order. Equivalence classes are a relatively recent invention intended to support non-English alphabets. But there seems to be no standard way to define them or determine their contents. Therefore, they are not fully implemented in GNU 'tr'; each character's equivalence class consists only of that character, which is of no particular use,
Try sed and use full classes to get past GNU problems. For Solaris I have no good answers, my home version is Solaris 9, and it is not POSIX compliant.
This User Gave Thanks to jim mcnamara For This Post:
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

How come sigs don't work?

They appear to be turned on, I entered mine in. The check boxes are all checked. And yet, no sigs? (4 Replies)
Discussion started by: l008com
4 Replies

2. Shell Programming and Scripting

find options don't work in script

Hi, I'm trying to write a bash script to find some files. However it seems that the find command is not behaving the same way when the script is executed as it does when executed from the command line: Script extract: #!/bin/bash ... NEW="/usr/bin/find current/applications/ -name '*jar'... (3 Replies)
Discussion started by: mattd
3 Replies

3. UNIX for Dummies Questions & Answers

Things in tutorials that don't work.

I am thankful for this site and for the many links provided. I have been going through one of the tutorials, but as I try some things, they don't seem to work. I am wondering if there is something I need first before being able to use a tutorial (like version number (HP-UX) or how I am getting... (1 Reply)
Discussion started by: arungavali
1 Replies

4. Programming

why printf() function don't go work?

I use FreeBSD,and use signal,like follows: signal(SIGHUP,sig_hup); signal(SIGIO,sig_io); when I run call following code,it can run,but I find a puzzled question,it should print some information,such as printf("execute main()") will print execute main(),but in fact,printf fuction print... (2 Replies)
Discussion started by: konvalo
2 Replies

5. Shell Programming and Scripting

Use variable in sed don't work.

Hi all. I have a script as below: cutmth=`TZ=CST+2160 date +%b` export cutmth echo $cutmth >> date.log sed -n "/$cutmth/$p" alert_sbdev1.log > alert_summ.log My purpose is to run through the alert_sbdev1.log and find the 1st occurence of 'Jan' and send everything after that line to... (4 Replies)
Discussion started by: ahSher
4 Replies

6. Programming

why daytime don't work?

Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows: #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define BUFFSIZE 150 int main(){ ... (2 Replies)
Discussion started by: konvalo
2 Replies

7. Programming

why printf don't work?

I use Solaris 10, I use following code: #include <signal.h> int main(void){ printf("----------testing-----------"); if(signal(SIGUSR1,sig_usr)==SIG_ERR) err_sys("can't catch SIGUSR1"); for(;;) pause(); sig_user(int signo){ ..... } when I run above code,it print nothing... (3 Replies)
Discussion started by: konvalo
3 Replies

8. HP-UX

awk don't work in hp-ux 11.11

Hello all! I have problem in hp-ux 11.11 in awk I want to grep sar -d 2 1 only 3 column, but have error in awk in hp-ux 11.11 Example: #echo 123 234 | awk '{print $2}' 123 234 The situattions in commands bdf | awk {print $5}' some... In hp-ux 11.31 - OK! How resolve problem (15 Replies)
Discussion started by: ostapv
15 Replies

9. Solaris

Open Terminal Don't work

Hi, I installed solaris 10 x86 on my local system. it was working fine. today when i started the system, it started up without any problem. when i tried to open the terminal it didn't open any terminal. Plz help me (0 Replies)
Discussion started by: malikshahid85
0 Replies
ISWGRAPH(3)						     Linux Programmer's Manual						       ISWGRAPH(3)

NAME
iswgraph - test for graphic wide character SYNOPSIS
#include <wctype.h> int iswgraph(wint_t wc); DESCRIPTION
The iswgraph() function is the wide-character equivalent of the isgraph(3) function. It tests whether wc is a wide character belonging to the wide-character class "graph". The wide-character class "graph" is a subclass of the wide-character class "print". Being a subclass of the wide-character class "print", the wide-character class "graph" is disjoint from the wide-character class "cntrl". The wide-character class "graph" is disjoint from the wide-character class "space" and therefore also disjoint from its subclass "blank". The wide-character class "graph" contains all the wide characters from the wide-character class "print" except the space character. It therefore contains the wide-character classes "alnum" and "punct". RETURN VALUE
The iswgraph() function returns nonzero if wc is a wide character belonging to the wide-character class "graph". Otherwise, it returns zero. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +-----------+---------------+----------------+ |Interface | Attribute | Value | +-----------+---------------+----------------+ |iswgraph() | Thread safety | MT-Safe locale | +-----------+---------------+----------------+ CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C99. NOTES
The behavior of iswgraph() depends on the LC_CTYPE category of the current locale. SEE ALSO
isgraph(3), iswctype(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2015-08-08 ISWGRAPH(3)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy