Re: Shell Scripts & permissions

From: Barry Margolin (barry.margolin_at_level3.com)
Date: 07/02/03


Date: Wed, 02 Jul 2003 14:50:55 GMT

In article <9d18d9fe.0307020643.5111b94e@posting.google.com>,
Dave from Dublin <davidmcguinness@dublin.ie> wrote:
>Hi,
>
>I have been having a problem with a shell script I wrote. When I type
>the 4 following lines into command line, it does what I want it to:
>
> SAMPLE="../data/1/3-11/2.ref"
> COMMAND="C99"
> LOG="DavesLog1.txt"
> private.removeBoundary < $SAMPLE | $COMMAND | JBeeferman --ref
>$SAMPLE >> $LOG
>
>However when I save ithese lines as a shell script and then execute it
>I get the following errors:
>
>Exception in thread "main" java.lang.ClassCastException:
>java.lang.Boolean
> at uk.ac.man.cs.choif.extend.Argx.get(Argx.java)
> at uk.ac.man.cs.choif.nlp.seg.linear.eval.Beeferman.main(Beeferman.java)
># C99 : Similarity matrix...
># C99 : Rank matrix (11x11 rank mask)...
># C99 : Sum of rank matrix...
># C99 : Divisive clustering (automatic termination)...
># C99 : Found 11 segments...
># C99 : Ready.
>./testDave2.sh: ../data/1/3-11/2.ref: Permission denied
>
>I have tried playing with the permissions of the file 2.ref but this
>only seems to make things worse. Does anyone have any idea what the
>problem is?

The problem is the line:

$SAMPLE >> $LOG

This is trying to execute ../data/1/3-11/2.ref as a command, which is
almost certainly not what you intended. That's probably supposed to be at
the end of the line that begins with "private.removeBoundary", but you
probably used a text editor that split the line because it was too long.

-- 
Barry Margolin, barry.margolin@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


Relevant Pages

  • Re: Change the order start up applications
    ... Would a shell script still be the way. ... "Dave Patrick" wrote: ... > Dave Patrick ....Please no email replies - reply in newsgroup. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Setting the Priority Permanently???
    ... Thanks Dave, works great! ... > in your shell script. ... So is there an automatic way to set the priority ...
    (microsoft.public.win2000.general)
  • Re: c programs & shell conditionals
    ... The c code shows what was used to generate a.out, seen in the shell script. ... on your platform). ... Their failure is not your excuse; time to find an unaverage pub. ...
    (comp.lang.c)
  • Re: ebuyer Prority express delivery [what a joke]
    ... After replacing Dave with a small shell script on Wednesday 15 Mar 2006 ... the following appeared on stdout: ... own stupidity] ... Wrong Dave, Dave. ...
    (uk.comp.vendors)
  • Re: using basic unix for everyday uses
    ... do any of you use basic unix commands and ... an even more powerful editor. ... > it's the sort of thing I'd do in a shell script. ... >> would be on a basic unix type system. ...
    (comp.unix.shell)