- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Strange Characters
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 01:01 PM
07-25-2002 01:01 PM
Strange Characters
PROBLEM: CATIA has strange file names in UNIX. I.E.
????F??I??N??I??S??H??E??D??-??07??22??02??-??04782638AA????KNUCKLE.model
I have written a few lines of script to remove the ?? sign from the name and replace it with spaces, and remove the .model, and convert any lower case char's to upper case.
The last problem is that the 23rd and 26th character need to be converted to slashes. This character while looking like a single quote is not.
I tried to do
ls ????F??I??N??I??S??H??E??D??-??07??22??02??-??04782638AA????KNUCKLE.model | tr "'" "/"
and it does not change the name.
How do i find what this character really is, and how do i change it to a '/' afterwards? Looks like it has the hex value of B1
here is the output of ls | od -xt
0000000 b1b146b1 49b14eb1 49b153b1 48b145b1
0000020 44b12db1 3037b432 32b43032 b12db130
0000040 34373832 36333841 41b1b14b 4e55434b
0000060 4c452e6d 6f64656c 0a000000
Thanks!
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 01:31 PM
07-25-2002 01:31 PM
Re: Strange Characters

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 10:41 PM
07-25-2002 10:41 PM
Re: Strange Characters
f=$VAR/$(echo $i:$DEPOT | sed "s%/%=%g")
man ascii does not ref b1...
you may want to give cut'n paste a shot
or...how to translate ";" to a "newline"?
cat $s | tr ";" "\012"
so what about
cat $s | tr "\0b1" "\020"
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 11:35 PM
07-25-2002 11:35 PM
Re: Strange Characters
You might want to try a script that does a simple test to find what character that is. I.e.
if [ "\'" = "\'" ] ; then
echo This is it!
fi
...and cycle through a few possibilities (grav, simgle quote, Alt-0145, Alt-0146, Crtl-Alt-').
And when you are doing the tr, you may have to escape the character if it is special - like the grav ( ` )
Cheers!
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2002 04:22 AM
07-26-2002 04:22 AM
Re: Strange Characters
There is a new feature in our profiles that allows us to look at all of the previous questions we have posted, which is especially helpful when trying to resove this:
This member has assigned points to 19 of 61 responses to his/her questions
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2002 10:03 AM
07-26-2002 10:03 AM
Re: Strange Characters
check out your stty setting "istrip -istrip".
It might be that the filename is stored with each char representing a byte, but when you do a ls on a terminal with "istrip" set, it might be that it is reduced to 7 bit on the screen.
Check "cs7 cs8" in addition.
It might be that what you see is not what is stored, if it comes to special chars in terminal sessions (ever had to deal with Umlauts in german environments ?).
Hope this will help
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 05:49 AM
07-31-2002 05:49 AM
Re: Strange Characters
I have been here 2 years longer than you, so know the rules of the Forums.
Any questions that had answers to them have been awarded points, and magic answers where applicable.
So my comment back to you is check the facts before making statements and judgements!
Now back to the question:
Since this character is not a standard single quote I can not use "tr" or "sed" to just swap the character.
Someone mentioned a script to find it's octal value, how would I do this?
Thanks,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 05:53 AM
07-31-2002 05:53 AM
Re: Strange Characters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 05:57 AM
07-31-2002 05:57 AM
Re: Strange Characters
octal format. You can then set up a filter to look for \nnn and tr -d "\xxx\yyy\zzz" where xxx, yyy, and zzz are octal values to remove the spurious characters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 08:00 AM
07-31-2002 08:00 AM
Re: Strange Characters
Any other way to get the ascii value instead of char value in these cases?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2002 02:37 AM
08-05-2002 02:37 AM
Re: Strange Characters
People mentioned to use tr(1) with its octal notation ('\OOO').
You seem to have problems determining the right octal value of the 23rd and 26th character. If so, you can just use "od" (octal dump) instead of "od -x", i.e.
ls | od
I.e. in short: Use "od" (without "-x") to determine the octal code(s) and then use tr(1) to translate that/those octal code(s) to slashes.
I hope this helps.
As to points assignment: In your own interest, you should assign points to all responses. If a response is of no value, you can assign 0 points (There used to be a "N/A" choice as well, but it might be gone after the lasest update.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2002 03:38 AM
08-05-2002 03:38 AM
Re: Strange Characters
Your correct that the two answers Clay provided fix the problem. I cant go back and change points though to give the magic answer.
The solution is a bit obscure, as the filenames the script reads will change constantly, and it is difficult to test each name and character. (23rd and 26th char will obviously change in each filename), thus the strange characters will move around.
Making a bit more confusing is that HP-UX, Solaris, AIX, and Irix all support different character tables. Thus I can strip out the "'" looking character in Solaris, but it shows up differently in the other Unices.
So, if Clay responds back, I can assign the magic answer to him.
Regards,
Shanno