Re: Whats wrong with this script ?
--- "Dr. Sachin Kale" <sauravsk@agd2.dot.net.in>
wrote:
>
> Colin Watson Sent: Wednesday, August 14, 2002 10:34
> AM
>
>
> > On Wed, Aug 14, 2002 at 08:49:49AM +0530, Dr.
> Sachin Kale wrote:
> > > I am trying to get a module compiled against
> kernel 2.2.12-20,
> work on
> > > 2.2.19; I found this script on the net, when I
> run this as
> > > ./fixscript esscom.o esscom.fix.o I get the
> error -
> > >
> > > Here is the original script -
> > >
> > > MI=/tmp/modinfo [ -z "$DEPMOD" ] &&
> DEPMOD=depmod #new kernel
> version
> >
> > Split that line after 'modinfo', so:
> >
> > MI=/tmp/modinfo
> > [ -z "$DEPMOD" ] && DEPMOD=depmod #new kernel
> version
> >
> After doing that I get the following error -
>
> ./fixscript1: line 6: syntax error near unexpected
> token `echo'
> ./fixscript1: line 6: ` echo -n doing $i
> '
> Now whats that about ?
>
> Sachin
I'm not sure if you saw this post, but it was the
one before Colin's response and the one that Colin was
refering to:
>for i in `$DEPMOD -e $1 2>&1 | sed 's/depmod://g' |
grep -vE
>"^$1:|Unresolved symbols|^#"` ; do
The above 2 lines look like they should be one line.
Also, add a shebang (#!/bin/(ba)sh) as the first line
of the script, for good measure.
(I haven't carefully inspected the rest of it, but
that's the first thing I noticed that's wrong, and
that would cause complaint about a misplaced `do'.)
good times,
Vineet
HTH Don
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
Reply to: