Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-13-2004, 05:50 PM   #1
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
grep for British pound sign?

Hi all

I'm trying to parse a web page for prices in .

The problem is that grep doesn't recognise the sign, and so doesn't return lines which contain it. Anyone know how this is done?


Old 12-13-2004, 06:03 PM   #2
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Rep: Reputation: 15
are you able to use ASCII codes???

decimal value 156 = british pound sign.
Old 12-13-2004, 06:37 PM   #3
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Original Poster
Rep: Reputation: 97
I've sort of solved the problem.

If I convert the web page to UTF-8 (with iconv -f ISO-8859-1 -t UTF-8 go.htm) grep works fine. I think I could probably get a similar effect by changing the $LANG variable, but iconv works for me.

It would be nice if grep could take ASCII codes, but I don't think it does. (There's no mention in the man page).

Cheers anyway.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any British distros? eBopBob Linux - Distributions 28 04-29-2014 03:41 AM
sign on invisible in gaim - NOT invi after sign on saravkrish Linux - Software 7 09-12-2005 10:55 PM
Fun issue - my pound key isn't working TMH Linux - Software 2 06-06-2005 05:08 AM
Pound 1.8 depdiver Red Hat 2 01-21-2005 11:25 AM
british pound sign, locale, charmaps jamesmercer Linux - General 0 03-13-2003 10:41 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration