[mythtv-users] FaceBook Status Updates in MythTV
Johan Venter
mythtv at vulturest.com
Mon Dec 15 06:07:05 UTC 2008
Brad DerManouelian wrote:
>> You're also not closing LOGFILE anywhere, but that's not a big deal
>> in a
>> Perl script, although seeing as you make a point of closing LASTRUN at
>> the end, you might want to be consistent :)
>
> I wasn't sure if it would interpret the ~/ correctly and I didn't want
> to hardcode a location. Does it?
I didn't literally mean use the tilde as that's a bash-ism (and other
shells that I don't use).
I'm not specifically sure how to get the home directory (which makes me
bad for suggesting you should use it when I didn't know myself sorry!),
a quick Google turned up the following:
$ perl -le'print( ( getpwuid $< )[ -2 ] )'
/home/john
Replacing -2 with 7 appears to work here too.
$ perl -le'print $ENV{ HOME }'
/home/john
Also works, but not sure how portable that is. Maybe something like:
Failing a combination of those, you could always chdir with no arguments
and see what happens :)
More information about the mythtv-users
mailing list