FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-03-2008, 06:39 PM
Skunk Worx
 
Default tail command : differences between solaris and linux

I've noticed if I try to install the JMF (Java Media Framework),
downloaded from Sun Micro, the script fails :


$ sh ./jmf-2_1_1e-linux-i586.bin
$ Unpacking...
<snip>
tail: cannot open `+309' for reading: No such file or directory
Extracting...
./install.sfx.5451: line 1: ==: No such file or directory
./install.sfx.5451: line 3: syntax error near unexpected token `)'
<snip>

...and the script ends up zero-length.

...and if I restore the file, then change the tail command that is
trying to dump out the code section :


$ sed -i 's/tail +309/tail -n +309/g' jmf-2_1_1e-linux-i586.bin

...it's ok.

So, they use "tail +309" and Fedora 9 needs "tail -n +309". Google shows
people have seen this under Ubuntu as well.


The Sun forums have a post saying it's an "OpenJDK problem", which seems
doubtful.


I'm just curious if anyone has insight into this. I'm guessing this is
an example of a difference between the tools on Solaris vs. Linux?


---
John

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 08-04-2008, 12:16 AM
Cameron Simpson
 
Default tail command : differences between solaris and linux

On 03Aug2008 11:39, Skunk Worx <skunkworx@verizon.net> wrote:
> I've noticed if I try to install the JMF (Java Media Framework),
> downloaded from Sun Micro, the script fails :
>
> $ sh ./jmf-2_1_1e-linux-i586.bin
> $ Unpacking...
> <snip>
> tail: cannot open `+309' for reading: No such file or directory
> Extracting...
> ./install.sfx.5451: line 1: ==: No such file or directory
> ./install.sfx.5451: line 3: syntax error near unexpected token `)'
> <snip>
>
> ...and the script ends up zero-length.
>
> ...and if I restore the file, then change the tail command that is
> trying to dump out the code section :
>
> $ sed -i 's/tail +309/tail -n +309/g' jmf-2_1_1e-linux-i586.bin
>
> ...it's ok.
>
> So, they use "tail +309" and Fedora 9 needs "tail -n +309". Google shows
> people have seen this under Ubuntu as well.

The latter syntax is POSIXly correct. Looks like they've got
historic usage on Solaris in their script. Certainly historicaly
the usage:

tail -100 file

for the _last_ 100 lines has been supported forever (though not required
by POSIX, which made all command line options conform to the standard
forms, hence the -n), and on Solaris it looks like a bare +number is
supported just like the bare -number.

But a quick check on a Gentoo box here does not support +number. A check on
MacOSX _does_ support +number. So it looks like the GNU tools are a bit
less helpful here, though still standard compliant.

Sun _should_ be shipping their script with "tail -n +309", unless
Solaris doesn't support that. It's quite possible that on Solaris
/bin/tail does not accept -n, and another version (eg in /usr/xpg4/bin)
would. But they must ship their script to work with the default
/bin/tail on Solaris. And before you whinge about that being deficient,
they may have left /bin/tail unchanged because that keeps their
customers' scripting expectations stable. Plenty of vendors have
to keep things stable for the "installed base". The same effect is why a
RedHat Enterprise box runs "old" software, and backports security and
bug fixes to the older code instead of upgrading to "current" - it keeps
the platform stable, and for enterprise stuff that's important.

Of course, the portable thing it to just move to saying:

sed 1,308d

instead of using "tail +number". Portable, stable.

Cheers,
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

WHAT"S A ""K3WL D00D"" AND WH3R3 CAN 1 G3T S0M3!!!!!!!!!!!????????
- Darren Embry

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 09:59 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org