Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

debugging prtdisk script...

1 view
Skip to first unread message

Denmark B. Weatherburn

unread,
Dec 21, 2000, 2:11:37 AM12/21/00
to
I'm located in Belize where there is only one ISP. I uncovered a fault in
their system while trying to download and subscribe to sun newsgroups.
Evidently, subscribers who get a certain range of IP addresses don't have
access to the news groups. They promised to resolve the problem.
Until then, I will post a script which was presented on this forum this
week.
I tried to execute it, but it has some syntax errors. Because, the shell
script calls nawk, I'm having some problems debugging it.
Please for some help:

Here is prtdisk:

#!/bin/csh
set dev = `/bin/ls -l $1 | nawk '{ n = split($11, a, "/");
split(a[n],b,":");
for(i = 4; i < n; i++) printf("/%s",a[i]); printf("/%s\n", b[1]) }'`
if ( $dev == "" ) exit
nawk -v dev=$dev '$1 ~ dev { n = split(dev, a, "/"); split(a[n], b, "@");
print
f("%s%s\n", b[1], $2) }' /etc/path_to_inst

This is the error:

bbankmain{opidh}/usr/bank/opidh>./prtdisk
Unmatched `

The only set of ` encapsulates the definition of dev environment variable.
It appears that the author intended to define dev environment variable as
the result of the nawk program. In that case the syntax looks correct as is,
except that several nawk commands are separated by semi-colons ";". I'm not
sure about the syntax though.

Please for your comments.

Regards,

Denmark W.

_______________________________________________
sunmanagers mailing list
sunma...@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers

0 new messages