Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"Buy land. They've stopped making it." -- Mark Twain


devel / comp.unix.shell / Re: Problem with shellcheck

SubjectAuthor
* Problem with shellcheckKenny McCormack
+- Problem with shellcheckKenny McCormack
`* Problem with shellcheckLew Pitcher
 `* Problem with shellcheckLew Pitcher
  `* Problem with shellcheckKenny McCormack
   +- Problem with shellcheckJalen Q
   `- Problem with shellcheckJalen Q

1
Problem with shellcheck

<u09dvv$1r5ja$1@news.xmission.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6886&group=comp.unix.shell#6886

  copy link   Newsgroups: comp.unix.shell
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell
Subject: Problem with shellcheck
Date: Sat, 1 Apr 2023 14:10:07 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u09dvv$1r5ja$1@news.xmission.com>
Injection-Date: Sat, 1 Apr 2023 14:10:07 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1939050"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sat, 1 Apr 2023 14:10 UTC

I have a script that starts with: #!/bin/dash

I want to "shellcheck" it. I do:

$ shellcheck myScript

and get err msg "

^-- SC1008: This shebang was unrecognized. Note that ShellCheck only
handles Bourne based shells.

OK, says I. There has to be a way to tell it which shell syntax to use.
So, I do: man shellcheck
and learn about the "-s" option.

I redo the comand as:

$ shellcheck -s sh myScript

but, surprisingly, get the same err msg. Is there a fix for this?

--
Life's big questions are big in the sense that they are momentous. However, contrary to
appearances, they are not big in the sense of being unanswerable. It is only that the answers
are generally unpalatable. There is no great mystery, but there is plenty of horror.
(https://en.wikiquote.org/wiki/David_Benatar)

Re: Problem with shellcheck

<u09ees$1r5ja$2@news.xmission.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6887&group=comp.unix.shell#6887

  copy link   Newsgroups: comp.unix.shell
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell
Subject: Re: Problem with shellcheck
Date: Sat, 1 Apr 2023 14:18:04 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u09ees$1r5ja$2@news.xmission.com>
References: <u09dvv$1r5ja$1@news.xmission.com>
Injection-Date: Sat, 1 Apr 2023 14:18:04 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1939050"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sat, 1 Apr 2023 14:18 UTC

In article <u09dvv$1r5ja$1@news.xmission.com>,
Kenny McCormack <gazelle@shell.xmission.com> wrote:
....
>$ shellcheck -s sh myScript
>
>but, surprisingly, get the same err msg. Is there a fix for this?

Update: The following seems to be a workaround:

$ sed 1s/da// myScript | shellcheck /dev/stdin

Of course, it'd be better if the "-s" option worked as expected.

P.S. And, yes, there is a reason I prefer to use #!/bin/dash instead of #!/bin/sh.

--
It's possible that leasing office space to a Starbucks is a greater liability
in today's GOP than is hitting your mother on the head with a hammer.

Re: Problem with shellcheck

<u09et6$1t8qm$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6888&group=comp.unix.shell#6888

  copy link   Newsgroups: comp.unix.shell
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: lew.pitcher@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.shell
Subject: Re: Problem with shellcheck
Date: Sat, 1 Apr 2023 14:25:43 -0000 (UTC)
Organization: The Pitcher Digital Freehold
Lines: 40
Message-ID: <u09et6$1t8qm$1@dont-email.me>
References: <u09dvv$1r5ja$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 1 Apr 2023 14:25:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0bca0fd3ca35609dfdf1a1414e7eb70c";
logging-data="2007894"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZIyESVHdn1q0ngMAnUMBH9TmR0GhKgp8="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:N7dvRS5CGEBJRPxxjK5QHGvcM7M=
 by: Lew Pitcher - Sat, 1 Apr 2023 14:25 UTC

On Sat, 01 Apr 2023 14:10:07 +0000, Kenny McCormack wrote:

> I have a script that starts with: #!/bin/dash
>
> I want to "shellcheck" it. I do:
>
> $ shellcheck myScript
>
> and get err msg "
>
> ^-- SC1008: This shebang was unrecognized. Note that ShellCheck only
> handles Bourne based shells.
>
> OK, says I. There has to be a way to tell it which shell syntax to use.
> So, I do: man shellcheck
> and learn about the "-s" option.
>
> I redo the comand as:
>
> $ shellcheck -s sh myScript
>
> but, surprisingly, get the same err msg. Is there a fix for this?

What version of shellcheck are you running? The current version seems
to be 0.9.0, released on Dec 13, 2022 [1].

According to the shellcheck wiki[2] (buried in the documentation on
the SC1008 error[3]) shellcheck /does/ support parsing of dash scripts.
OTOH, the error msg you quoted explicitly says that it does not. This
leads me to believe that shellcheck added dash support in a version
later than the one you run.

Perhaps an upgrade is in order?

[1] https://github.com/koalaman/shellcheck/releases/tag/v0.9.0
[2] https://github.com/koalaman/shellcheck/wiki
[3] https://github.com/koalaman/shellcheck/wiki/SC1008
--
Lew Pitcher
"In Skills We Trust"

Re: Problem with shellcheck

<u09f7k$1t8qm$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6889&group=comp.unix.shell#6889

  copy link   Newsgroups: comp.unix.shell
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: lew.pitcher@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.unix.shell
Subject: Re: Problem with shellcheck
Date: Sat, 1 Apr 2023 14:31:17 -0000 (UTC)
Organization: The Pitcher Digital Freehold
Lines: 35
Message-ID: <u09f7k$1t8qm$2@dont-email.me>
References: <u09dvv$1r5ja$1@news.xmission.com>
<u09et6$1t8qm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 1 Apr 2023 14:31:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0bca0fd3ca35609dfdf1a1414e7eb70c";
logging-data="2007894"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/EY6yNEQsZuqIFn9VYaOvQiVb6K4P/VyM="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:JaoCMlpul+B3f6QFLYVhTsHe49E=
 by: Lew Pitcher - Sat, 1 Apr 2023 14:31 UTC

On Sat, 01 Apr 2023 14:25:43 +0000, Lew Pitcher wrote:

> On Sat, 01 Apr 2023 14:10:07 +0000, Kenny McCormack wrote:
>
>> I have a script that starts with: #!/bin/dash
>>
>> I want to "shellcheck" it. I do:
>>
>> $ shellcheck myScript
>>
>> and get err msg "
>>
>> ^-- SC1008: This shebang was unrecognized. Note that ShellCheck only
>> handles Bourne based shells.
>>
>> OK, says I. There has to be a way to tell it which shell syntax to use.
>> So, I do: man shellcheck
>> and learn about the "-s" option.
>>
>> I redo the comand as:
>>
>> $ shellcheck -s sh myScript
>>
>> but, surprisingly, get the same err msg. Is there a fix for this?
>
> What version of shellcheck are you running? The current version seems
> to be 0.9.0, released on Dec 13, 2022 [1].

FWIW, It appears that dash support was added to shellcheck in v0.4.2
(Jan 9, 2016) and maintenance applied in various releases after.

[snip]
--
Lew Pitcher
"In Skills We Trust"

Re: Problem with shellcheck

<u09fjr$1r5ja$3@news.xmission.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6890&group=comp.unix.shell#6890

  copy link   Newsgroups: comp.unix.shell
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell
Subject: Re: Problem with shellcheck
Date: Sat, 1 Apr 2023 14:37:47 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u09fjr$1r5ja$3@news.xmission.com>
References: <u09dvv$1r5ja$1@news.xmission.com> <u09et6$1t8qm$1@dont-email.me> <u09f7k$1t8qm$2@dont-email.me>
Injection-Date: Sat, 1 Apr 2023 14:37:47 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1939050"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sat, 1 Apr 2023 14:37 UTC

In article <u09f7k$1t8qm$2@dont-email.me>,
Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
....
>> What version of shellcheck are you running? The current version seems
>> to be 0.9.0, released on Dec 13, 2022 [1].
>
>FWIW, It appears that dash support was added to shellcheck in v0.4.2
>(Jan 9, 2016) and maintenance applied in various releases after.

My version seems to be: 0.3.4-3

So, yeah, I'll see about getting a newer version.

Thanks for checking.

--
Elect a clown, expect a circus.

Re: Problem with shellcheck

<eab86443-84a4-481a-a724-615c1c3f8473n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6926&group=comp.unix.shell#6926

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:6214:8e9:b0:5ef:4390:3d34 with SMTP id dr9-20020a05621408e900b005ef43903d34mr95246qvb.1.1681271272165;
Tue, 11 Apr 2023 20:47:52 -0700 (PDT)
X-Received: by 2002:a4a:2c10:0:b0:525:2b3b:7453 with SMTP id
o16-20020a4a2c10000000b005252b3b7453mr3875397ooo.0.1681271272015; Tue, 11 Apr
2023 20:47:52 -0700 (PDT)
Path: rocksolid2!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 11 Apr 2023 20:47:51 -0700 (PDT)
In-Reply-To: <u09fjr$1r5ja$3@news.xmission.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:e82:d400:11c7:2592:83a3:8497;
posting-account=rR5tnAoAAAC2kIBHWh0n6frMCTGowyvE
NNTP-Posting-Host: 2600:1700:e82:d400:11c7:2592:83a3:8497
References: <u09dvv$1r5ja$1@news.xmission.com> <u09et6$1t8qm$1@dont-email.me>
<u09f7k$1t8qm$2@dont-email.me> <u09fjr$1r5ja$3@news.xmission.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eab86443-84a4-481a-a724-615c1c3f8473n@googlegroups.com>
Subject: Re: Problem with shellcheck
From: jalenq81@gmail.com (Jalen Q)
Injection-Date: Wed, 12 Apr 2023 03:47:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1973
 by: Jalen Q - Wed, 12 Apr 2023 03:47 UTC

On Saturday, April 1, 2023 at 9:37:53 AM UTC-5, Kenny McCormack wrote:
> In article <u09f7k$1t8qm$2...@dont-email.me>,
> Lew Pitcher <lew.p...@digitalfreehold.ca> wrote:
> ...
> >> What version of shellcheck are you running? The current version seems
> >> to be 0.9.0, released on Dec 13, 2022 [1].
> >
> >FWIW, It appears that dash support was added to shellcheck in v0.4.2
> >(Jan 9, 2016) and maintenance applied in various releases after.
> My version seems to be: 0.3.4-3
>
> So, yeah, I'll see about getting a newer version.
>
> Thanks for checking.
>
> --
> Elect a clown, expect a circus.
NHGVFFFFFFRFRRFRFRFRFVGGVGVGVGGVGVGGVGGVGVGVG

Re: Problem with shellcheck

<32068c82-8096-4b23-930b-cb8619f5e148n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=6927&group=comp.unix.shell#6927

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:622a:19a4:b0:3e3:9502:8e0e with SMTP id u36-20020a05622a19a400b003e395028e0emr1745076qtc.3.1681271280986;
Tue, 11 Apr 2023 20:48:00 -0700 (PDT)
X-Received: by 2002:a05:6808:1cb:b0:389:6b0e:9d89 with SMTP id
x11-20020a05680801cb00b003896b0e9d89mr223924oic.2.1681271280784; Tue, 11 Apr
2023 20:48:00 -0700 (PDT)
Path: rocksolid2!i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 11 Apr 2023 20:48:00 -0700 (PDT)
In-Reply-To: <u09fjr$1r5ja$3@news.xmission.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:e82:d400:11c7:2592:83a3:8497;
posting-account=rR5tnAoAAAC2kIBHWh0n6frMCTGowyvE
NNTP-Posting-Host: 2600:1700:e82:d400:11c7:2592:83a3:8497
References: <u09dvv$1r5ja$1@news.xmission.com> <u09et6$1t8qm$1@dont-email.me>
<u09f7k$1t8qm$2@dont-email.me> <u09fjr$1r5ja$3@news.xmission.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <32068c82-8096-4b23-930b-cb8619f5e148n@googlegroups.com>
Subject: Re: Problem with shellcheck
From: jalenq81@gmail.com (Jalen Q)
Injection-Date: Wed, 12 Apr 2023 03:48:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Jalen Q - Wed, 12 Apr 2023 03:48 UTC

On Saturday, April 1, 2023 at 9:37:53 AM UTC-5, Kenny McCormack wrote:
> In article <u09f7k$1t8qm$2...@dont-email.me>,
> Lew Pitcher <lew.p...@digitalfreehold.ca> wrote:
> ...
> >> What version of shellcheck are you running? The current version seems
> >> to be 0.9.0, released on Dec 13, 2022 [1].
> >
> >FWIW, It appears that dash support was added to shellcheck in v0.4.2
> >(Jan 9, 2016) and maintenance applied in various releases after.
> My version seems to be: 0.3.4-3
>
> So, yeah, I'll see about getting a newer version.
>
> Thanks for checking.
>
> --
> Elect a clown, expect a circus.
VVYVVVVVYYVVYCCC

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor