|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
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' |
|
|||
wow, i must learn awk better then...
thanks for the help, ill give it a shot soon as i get home... |
|
||||
AWK is worth learning.
Although one could probably settle on Perl instead of sed+awk, it's best to know all three or at least sed & awk ;-)
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
||||
I find Perl best suited when it is inconvenient to be limited to POSIX sed and old awk.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|