Skip to content

Preventing syntax errors with old shell scripts

I was trying to install Unreal Tournament GOTY on one of my Linux machines. I downloaded and ran the script ut-install-436-GOTY.run but I got this error:

cannot open `+6' for reading: No such file or directory 

This line caused it:

sum1=`tail +6 $0 | cksum | sed -e 's/ /Z/' -e 's/   /Z/' | cut -dZ -f1`

To fix it, I set this environment variable:

export _POSIX2_VERSION=199209

Apparently, this makes programs behave differently. Research is required to find out exactly what it does…


    4 Comments ( Add comment / trackback )

    1. (permalink)
      Comment by Rowan Rodrik
      On February 15, 2010 at 13:35

      On the topic of UT: I have a spare machine taking up space here. It has a working screen (17″). I’m not sure about its guts though. My impression is that its PSU is kind of fucked. But, if that’s the case, there’s probably plenty of unused PSU’s on the attic here.

      Are you interested? Then I’ll try to find out what goods it has inside.

    2. (permalink)
      Comment by halfgaar
      On February 17, 2010 at 19:21

      I don’t really see the relvance of UT and a machine, but can you give me some kind of indication about the specs? GHz? Or is it that P3 500?

    3. (permalink)
      Comment by Rowan Rodrik
      On February 18, 2010 at 19:33

      Well, I thought I heard you mention that one of your gaming machines was broken or at least had a broken screen.

    4. (permalink)
      Comment by halfgaar
      On February 19, 2010 at 00:45

      Actually, it was a broken hard disk. I might be interested in that. Things like memory too, perhaps.

      So, what machine is it?