Thread: script to check for empty last line and delete it
i have cool conky from
http://www.quicktweaks.com/2008/09/2...buntu-desktop/
lately i've not been getting temps show up. i've figured out because weather file generates has empty last line , script reads last line temp. want check empty last line , if there delete (hence making temp last line again).
code isn't working, doing wrong:
code:#!/bin/bash plik=~/weather2 w3m -dump http://weather.yahoo.com/forecast/"$kod".html | grep -a21 "current" | sed 's/deg/°/g' > $plik if [ "`tail -1c "$plik"`" == " " ]; sed '$d' $plik >> $plik; fi
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] script to check for empty last line and delete it
Ubuntu
Comments
Post a Comment