Check those shell scripts online!

Forum rules
Before you post please read how to get help

Check those shell scripts online!

Postby Habitual on Thu Aug 01, 2013 5:45 pm

Shellcheck is a static analysis and linting tool for sh/bash scripts. It's mainly focused on handling typical beginner and intermediate level syntax errors and pitfalls where the shell just gives a cryptic error message or strange behavior, but it also reports on a few more advanced issues where corner cases can cause delayed failures.

Visual feedback on common scripting errors and syntax issues.
It's a Keeper!

Enjoy.
Last edited by Habitual on Tue Nov 12, 2013 7:01 pm, edited 1 time in total.
What's a landing but a take off in reverse?
User avatar
Habitual
Level 8
Level 8
 
Posts: 2274
Joined: Sun Nov 21, 2010 8:31 pm
Location: LM17Q-Xfce

Linux Mint is funded by ads and donations.
 

Re: Check those shell scripts onliine!

Postby jmdeking on Thu Aug 22, 2013 7:28 am

Great site, gonna use it when in trouble scripting something :)
jmdeking
Level 2
Level 2
 
Posts: 58
Joined: Sun Jul 15, 2012 7:59 am

Re: Check those shell scripts onliine!

Postby Habitual on Thu Aug 22, 2013 4:42 pm

It is, but NOTE:
It likes to 'suggest' escaping some $(sub-shell) processes with "Quote this to prevent word splitting."

for example:
Code: Select all
ec2-copy-image -r us-east-1 --region us-west-2 -s $( awk 'NR==1 {print $2}' "$lst" ) -n "$td" -d "Daily ${suffix} backup" # 'bad substitution' "error" using ${suffix^}


but still, it's a Winner.
What's a landing but a take off in reverse?
User avatar
Habitual
Level 8
Level 8
 
Posts: 2274
Joined: Sun Nov 21, 2010 8:31 pm
Location: LM17Q-Xfce

Re: Check those shell scripts onliine!

Postby xenopeek on Tue Aug 27, 2013 3:10 pm

Might be handy, thanks! How did you stumble on this one :) The offline version is something I might be adding.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15437
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Check those shell scripts onliine!

Postby Habitual on Thu Aug 29, 2013 4:49 pm

xenopeek wrote:Might be handy, thanks! How did you stumble on this one :) The offline version is something I might be adding.


TBH, I'm not certain. I think I grokked it over at Ubuntuforums.org tooling around like I do, looking "under the hood" for challenges/solutions, you know ;)
What's a landing but a take off in reverse?
User avatar
Habitual
Level 8
Level 8
 
Posts: 2274
Joined: Sun Nov 21, 2010 8:31 pm
Location: LM17Q-Xfce


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 1 guest