LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

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

Rep: Reputation: 96
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?

Cheers.

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

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

http://www.asciitable.com/

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

Original Poster
Rep: Reputation: 96
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.

Dave
 
  


Reply


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 X.org 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


All times are GMT -5. The time now is 02:24 AM.

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