HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- BOM  charater issue
Operating System - HP-UX
1833772
Members
2399
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
06-09-2010 06:36 AM
06-09-2010 06:36 AM
BOM  charater issue
Dear Gurus,
I am getting BOM character () in unix files. Do you have any idea how to get rid off.
Regards,
Awadhesh
I am getting BOM character () in unix files. Do you have any idea how to get rid off.
Regards,
Awadhesh
It's kind of fun to do the impossible
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2010 09:34 AM
06-09-2010 09:34 AM
Re: BOM  charater issue
> [...] BOM character () [...]
I don't know what a BOM character is, and, as
you can see, this forum is not very good at
rendering exotic ASCII characters.
> I am getting [...] in unix files.
Getting _how_? Which "unix files"? (What
_are_ "unix files"?)
> Do you have any idea how to get rid off.
Stop putting them in there in the first
place?
man sed
I don't know what a BOM character is, and, as
you can see, this forum is not very good at
rendering exotic ASCII characters.
> I am getting [...] in unix files.
Getting _how_? Which "unix files"? (What
_are_ "unix files"?)
> Do you have any idea how to get rid off.
Stop putting them in there in the first
place?
man sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2010 09:57 AM
06-09-2010 09:57 AM
Re: BOM  charater issue
BOM = Byte-Order Mark, an optional feature in Unicode text files. It should appear at the beginning of the file only. The modern version of the Unicode standard says it should not be used in the middle of text.
http://en.wikipedia.org/wiki/Byte_order_mark
In UTF-8, the BOM is represented as a three-byte sequence: 0xEF,0xBB,0xBF.
This "bomfilter" script could be used to filter the UTF-8 BOM character out from any text piped to it:
#!/bin/sh
BOM=$(/bin/echo \\0357\\0273\\0277\\c)
sed -e "s/$BOM//g"
Examples of use:
bomfilter < bomtext.txt | more
grep someword bomtext.txt | bomfilter | more
MK
http://en.wikipedia.org/wiki/Byte_order_mark
In UTF-8, the BOM is represented as a three-byte sequence: 0xEF,0xBB,0xBF.
This "bomfilter" script could be used to filter the UTF-8 BOM character out from any text piped to it:
#!/bin/sh
BOM=$(/bin/echo \\0357\\0273\\0277\\c)
sed -e "s/$BOM//g"
Examples of use:
bomfilter < bomtext.txt | more
grep someword bomtext.txt | bomfilter | more
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP