DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 26th May 2008
piercedfreak piercedfreak is offline
New User
 
Join Date: May 2008
Posts: 2
Default sed help

i have a small weather script, for graphing weather, but sed doesnt work right for part of it, and i do not see anything wrong with it. it has been bugging me for about 2 days now, so i figure its time to post, and ask.

Code:
cat /var/tmp/localweather.xml | grep "<s>" | awk -F'>' '{print $2}' | awk -F'<' '{print $1}' | sed 's/C|c|L|l|M|m|N|n|A|a\//0/g'
basically if the weather report says the wind is "calm" or "N\A" of any sort, its supposed to change it to 0. but it doesnt, it still reports "calm".
Reply With Quote
 

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:20 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick