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 > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-22-2012, 02:54 PM
CJ Tres
 
Default running a simple command line tool

On 02/22/2012 09:25 AM, Avi Greenbury wrote:

CJ Tres wrote:

Yes. I could have been a bit more detailed.
I did try ./natool also, from within and outside the dir that hold
the binary.
Natool (or rather natool) gets the result "No command 'natool'
found..." ./natool results in "./natool: No such file or directory"
wherever it is run from.


Aha, I've just re-read and seen that you've installed it, which means
that it's probably not simply extracted into your current working
directory.
Normally, install scripts attempt to put the binary somewhere in your
$PATH, but he might have missed (gone for somewhere that normally is,
but in this case isn't).
Quickest would be either to peruse the Makefile.PL and/or configure
scripts to see if there's any clue, or pehaps to email the developer
and ask them. It might well be in the README or INSTALL files, too, so
that'd be worth doing before poking him.


No Makefile or configure script.
Yes, it installs into /usr/local but I don't see it there.

The README explains how to put it somewhere else (--perfix option) but I
decided to leave well enough alone and just ran the perl script to
install as it was written.




Were did you get this package from? I'll have a go at installing it and
see if I can let you know everything it needs to get it working if you
like.


I'd appreciate that Avi. Thank you.
Downloaded from http://www.blit.ca/downloads/natool-1.00.02.tar.gz

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-22-2012, 02:57 PM
CJ Tres
 
Default running a simple command line tool

On 02/22/2012 09:25 AM, Avi Greenbury wrote:



Were did you get this package from? I'll have a go at installing it and
see if I can let you know everything it needs to get it working if you
like.


From http://www.blit.ca/natool.html:


Linux or another Unix-style operating system capable of mounting the Neuros.
Perl 5.8.x or later.
Class::Std and Test::More modules installed.
A Neuros with the hard-drive backpack and firmware version 2.28 or
later. (Others may work but I've only tested it with 2.28.)


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-22-2012, 06:13 PM
Chris Green
 
Default running a simple command line tool

On Wed, Feb 22, 2012 at 09:25:35AM -0600, CJ Tres wrote:
> On 02/22/2012 09:16 AM, Chris Green wrote:
>
> >>
> >Show us the result of "ls -l" in the directory where you [think you]
> >have natool installed.
> >
>
> This is from the directory that holds the bin dir where the script lives:
> drwxr-xr-x 2 curt curt 4096 2012-02-22 06:59 bin
> -rw-r--r-- 1 curt curt 1053 2012-02-21 17:33 Copyright.txt
> drwxr-xr-x 5 curt curt 4096 2012-02-21 17:33 CPAN
> -rw-r--r-- 1 curt curt 7977 2012-02-21 17:33 install.pl
> -rw-r--r-- 1 curt curt 18009 2012-02-21 17:33 LICENSE.GPL
> -rw-r--r-- 1 curt curt 31020 2012-02-21 17:33 natool.1.pod
> drwxr-xr-x 3 curt curt 4096 2012-02-21 17:33 Neuros
> -rw-r--r-- 1 curt curt 2464 2012-02-21 17:33 README
> drwxr-xr-x 9 curt curt 4096 2012-02-22 07:05 regression_tests
> -rw-r--r-- 1 curt curt 8 2012-02-21 17:33 VERSION
>
> This is from within the "bin" dir:
> total 4
> -rwxr-xr-x 1 curt curt 274 2012-02-21 17:33 natool
>
Well it's not going to work unless *that* bin dir is on your path.

By saying "./natool" you're asking for natool in the current directory
and, quite correctly, it's telling you it's not there.

If you're still in the above directory you need to say "bin/natool" but
in the long term you need to add the path to that bin directory to your
PATH variable. Read up how to do that, there are tutorials/explanations
all over the internet which will be much better than I can manage.

--
Chris Green

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-23-2012, 10:16 AM
CJ Tres
 
Default running a simple command line tool

On 02/22/2012 09:25 AM, Avi Greenbury wrote:



Were did you get this package from? I'll have a go at installing it and
see if I can let you know everything it needs to get it working if you
like.


Well I've had some success now that I have a better understanding of the
environment and the PATH variables.


The first part of the command is an option, literally --neuros-path,
not the actual path followed by the mount point, so that was just my
ignorance.


Still something is not right as the install did not put the executable
in /usr/local as the man page stated it would.


I have executed it (bin/natool) and copied a couple albums to the player
so it works, just need to figure out what I did wrong in installing as
there was an error:


Running basic smoketest.
smoketest.sh: 12: [[: not found
smoketest.sh: 18: [[: not found
smoketest.sh: 26: function: not found
Error found. Leaving run.11199 in place.
Unable to execute command: 'sh test.sh'

The developer has been very helpful and generous in schooling me.


So... a question.
From my obvious lack of knowledge, would an understanding of bash
scripting help shed some light on my darkness in this case, or is it
perl I would need to better understand?


Thanks for your time.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-23-2012, 10:35 AM
Steve Flynn
 
Default running a simple command line tool

On 23 February 2012 11:16, CJ Tres <ctres@grics.net> wrote:

> Running basic smoketest.
> smoketest.sh: 12: [[: not found
> smoketest.sh: 18: [[: not found
> smoketest.sh: 26: function: not found
> Error found. *Leaving run.11199 in place.
> Unable to execute command: 'sh test.sh'


These errors are coming from smoketest.sh shell script - it's
basically saying that the shell the script is running under doesn't
support [[ and ]] as test commands.

Have a look at the first line of this script - it'll begin with a hash
bang (#!) followed by the name of the shell which should be used to
interpret the script.

What does it say?

--
Steve

When one person suffers from a delusion it is insanity. When many
people suffer from a delusion it is called religion.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-23-2012, 10:40 AM
Avi Greenbury
 
Default running a simple command line tool

CJ Tres wrote:

> Running basic smoketest.
> smoketest.sh: 12: [[: not found
> smoketest.sh: 18: [[: not found
> smoketest.sh: 26: function: not found
> Error found. Leaving run.11199 in place.
> Unable to execute command: 'sh test.sh'

This looks like it's down to a naughty developer

[[ is a 'bashism' (so-called because it's something that exists in
bash but not in the 'sh' that it's a development from).

The command 'sh test.sh' passes the 'test.sh' script to 'sh' which is
a shell. Normally and historically it's a link to /bin/bash but
modern Ubuntus and Debians use dash instead (in the interests of
speed). [[ doesn't work in dash, so the test script fails on that error
and the install aborts.

It should be a simple fix - the invocation of that script should be

bash test.sh

rather than

sh test.sh

> So... a question.
> From my obvious lack of knowledge, would an understanding of bash
> scripting help shed some light on my darkness in this case, or is it
> perl I would need to better understand?

Of scripting, bash would be more helpful here. Perhaps most useful
would be experience installing Perl apps, but that's rather niche

Really, this is less bash scripting and more simply using bash, but the
easiest way to use bash is to automate it into scripts.

--
Avi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-23-2012, 10:45 AM
Avi Greenbury
 
Default running a simple command line tool

On Thu, 23 Feb 2012 11:35:52 +0000
Steve Flynn <anothermindbomb@gmail.com> wrote:

> On 23 February 2012 11:16, CJ Tres <ctres@grics.net> wrote:
>
> > Running basic smoketest.
> > smoketest.sh: 12: [[: not found
> > smoketest.sh: 18: [[: not found
> > smoketest.sh: 26: function: not found
> > Error found. *Leaving run.11199 in place.
> > Unable to execute command: 'sh test.sh'
>
> [...]
> Have a look at the first line of this script - it'll begin with a hash
> bang (#!) followed by the name of the shell which should be used to
> interpret the script.

Because it's being invoked by being passed as an argument to the
interpreter ('sh test.sh') it doesn't much matter what the shebang says
- it's parsed as just another comment.

The problem is that it's being passed to sh which is probably dash (and
patently not bash), rather than the bash the developer intended.

For example:

[avi@linear test.d]$ cat test.pl
#! /usr/bin/perl
print "I'm a perl script
";
[avi@linear test.d]$ ./test.pl
I'm a perl script
[avi@linear test.d]$ bash test.pl
test.pl: line 2: print: command not found
[avi@linear test.d]$

--
Avi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




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

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