« Taking apart a Maxtor OneTouch II external hard driveWhat are they? »

Interesting BASH quirk....

02/18/06

  03:10:38 pm, by The Dreamer   , 300 words  
Categories: ReplayTV, Software, Computer

Interesting BASH quirk....

I had a fustrating experience....in making continued enhancements to my Personal ReplayGuide 'update' script, I added some handling for a missing map entry (Zap2It is not providing a map entry for UHD, even though the site knows that it should be at 715).

A simple thing that I've done hundreds of times on other platforms (at work in a file called nsconfigmod, apconfigmod, csconfigmod, or the like) that looks to see if a line is present or not (using grep) and adds lines as needed (using sed).

But, for some reason it just wouldn't work on the Linux box that is running PRG. I stared at it for a good long time, and then tried the script on my other Linux boxes....and it worked. So I started thinking maybe I need a newer version of 'sed'...that didn't help. Maybe a newer version of 'bash'. Well....really new versions have other dependencies that I didn't feel like tackling for this one seeming odd quirk. The PRG box is a RedHat 7.3-legacy box, while my other Linux boxes are more modern (though the other main Linux box will also be update frozen soon)....anyways...one is using bash-2.05a-xx and the other box has a bash-3.0-xx. Evidently the way the versions treat line continuation characters differs....which was what was tripping me up. :##

I later looked at the datadirect2sql.pl script and came up with what I think is a better fix for the problem.

Namely, initialize the 'tuning' to 0, so it will at least have a value....and it won't bomb out with a bad INSERT. Next will be to convince it to have the correct mapping using something that doesn't require me to know the tmsid and figure out where to put the map entry.

No feedback yet

Now instead of subjecting some poor random forum to a long rambling thought, I will try to consolidate those things into this blog where they can be more easily ignored profess to be collected thoughts from my mind.

Latest Poopli Updaters -- http://lkc.me/poop

bloglovin

There are 20 years 1 month 28 days 4 hours 4 minutes and 54 seconds until the end of time.
And, it has been 4 years 10 months 30 days 9 hours 58 minutes and 2 seconds since The Doctor saved us all from the end of the World!

Search

November 2017
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
Google

Linkblog

  XML Feeds

Who's Online?

  • Guest Users: 1
This seal is issued to lawrencechen.net by StopTheHacker Inc.
blogging tool

hosted by
Green Web Hosting! This site hosted by DreamHost.

monitored by
Monitored by eXternalTest
SiteUptime Web Site Monitoring Service
website uptime