This utility verifies all commands used by a shell script against an allow list

Find external commands required by shell scripts

When writing shell scripts that need to run portably across multiple hosts and platforms, it's useful to know what external commands are required. This utility does exactly that.

Example

$ shreq ./testdata/*.sh
testdata/001.sh:3:20: unsupported external command: parallel
testdata/002.sh:3:1: unsupported external command: parallel
testdata/002.sh:5:3: unsupported external command: mc
$ shreq -c parallel,mc testdata/*
$

Usage

Usage: shreq <script> ...

This utility verifies all commands used by a shell script against an allow list:

      . : [ admin alias ar asa at awk basename bash batch bc bg bind break
      builtin c99 cal case cat cd cflow chgrp chmod chown cksum cmp comm
      command compgen complete compress continue cp crontab csplit ctags cut
      cxref date dd declare delta df diff dirname dirs disown du echo ed
      enable env eval ex exec exit expand export expr false fc fg file find
      fold fort77 fuser gencat get getconf getopts grep hash head help
      history iconv id if ipcrm ipcs jobs join kill let lex link ln local
      locale localedef logger logname logout lp ls m4 mailx make man mesg
      mkdir mkfifo more mv newgrp nice nl nm nohup od paste patch pathchk
      pax popd pr printf prs ps pushd pwd qalter qdel qhold qmove qmsg
      qrerun qrls qselect qsig qstat qsub read readonly renice return rm
      rmdel rmdir sact sccs sed set sh shift shopt sleep sort source split
      strings strip stty suspend tabs tail talk tee test time times touch
      tput tr trap true tsort tty type typeset ulimit umask unalias uname
      uncompress unexpand unget uniq unlink unset until uucp uudecode
      uuencode uustat uux val vi wait wc what while who write xargs yacc

Arguments:
  <script> ...    Shell scripts to validate.

Flags:
  -h, --help              Show context-sensitive help.
  -a, --allow=none,...    Enable optional features (none,relative,var-relative).
  -c, --cmds=CMD,...      Extra commands to allow.
Similar Resources

📷 Command-line utility to download all photos from Instagram

📷 Command-line utility to download all photos from Instagram

Instagram Downloader This is a simple command-line tool, written in Go, to download all images from an Instagram account. Getting Started Install inst

Sep 9, 2022

A tool to enumerate all the command-line arguments used to start a Linux process written in Go.

A tool to enumerate all the command-line arguments used to start a Linux process written in Go.

ranwith A tool to enumerate all the command-line arguments used to start a Linux process written in Go. ranwith uses the Linux /proc directory to obta

Jun 30, 2022

kubeaudit helps you audit your Kubernetes clusters against common security controls

kubeaudit helps you audit your Kubernetes clusters against common security controls

Dec 30, 2022

CLI to run your dataframes against SLU service and generated labeled dataframe.

trail CLI to run your dataframes against different services (currently, SLU service). Setup Get the latest binaries from the releases here. Choose the

Nov 12, 2021

ntest is a cross-platform cli app that runs multiple tests against any address.

ntest is a cross-platform cli app that runs multiple tests against any address.

ntest ntest is a cross-platform cli app that runs multiple tests against any address. About ntest Having the ability to run common tests against any d

Jan 3, 2022

This plugin will analyse the JFrog Platform instance and provide the non conformance against the best practices based on the predefines rules.

hello-frog About this plugin This plugin is a template and a functioning example for a basic JFrog CLI plugin. This README shows the expected structur

Nov 30, 2021

A simple script to run speedtest(offical) CLI tool and store the results in CSV

PeriodicBW A script made to run official speedtest.net binary periodically and store the results in a CSV file Installation Get the official speedtest

Aug 10, 2021

Script to check open slot for 18+ age group in particular district and pin code area

Running instruction install go: 1.14 (might work with other versions as well) install following library for sending notifications go get -u github.com

Mar 22, 2022

Hostover is a hosts file poisoning script written in Go

Hostover is a hosts file poisoning script written in Go

Hostover - Hosts file Poisoner Hostover is a hosts file poisoning script written in Go It will poison the hosts file with fake IP-Domain connections,

Jan 1, 2022
Related tags
🧑‍💻📊 Show off your most used shell commands
🧑‍💻📊 Show off your most used shell commands

tsukae ??‍?? ?? Tsukae, 使え - means use in Japanese (so it refers to commands that you use) Built on top of termui and cobra Big shoutout to jokerj40 f

Dec 17, 2022
Commando - run commands against networking devices in batch mode
Commando - run commands against networking devices in batch mode

Commando is a tiny tool that enables users to collect command outputs from a single or a multiple networking devices defined in an inventory file.

Oct 30, 2022
ap 是一个 shell 工具,可以让其它 shell 命令的输出能够自动进入交互翻页模式

ap -- auto-pager ap 是一个 shell 工具,可以让其它 shell 命令的输出能够自动进入交互翻页模式。 ap 由两部分组成,一个 Go 语言编写的二进制程序,负责捕获命令的输出并支持翻页, 和一组 shell 脚本,负责为用户指定的命令清单创建与之同名的 wrapper。 经

Apr 12, 2022
Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file.
Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file.

Sampler. Visualization for any shell command. Sampler is a tool for shell commands execution, visualization and alerting. Configured with a simple YAM

Dec 28, 2022
Go package for running Linux distributed shell commands via SSH.
Go package for running Linux distributed shell commands via SSH.

Go package for running Linux distributed shell commands via SSH.

Dec 7, 2022
Create new commands from your shell history or terminal.

overdub Create new commands from your shell history or terminal. TODO list for initial release Filter out unlikely commands (e.g. package managers) fr

Aug 9, 2022
Testing local and remote shell commands in Go

Testing local and remote shell commands in Go. This is an (intentionally simplified) example of how unix shell commands can be unit-tested in Go. The

Nov 30, 2021
Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

Aug 29, 2022
A simple shopping list that keeps track of a users shopping list using charm.sh tools

Terminal Shopping List This repo is a practise project for learning practical Go. I have chosen to use a toolset called Charm as it provides a rich se

Jan 13, 2022
cli tools for list all pages in logseq repo, marked with public or private

logseq-pages A cli tool for list all pages in logseq repo, marked with public or private. When I using logseq to build my knowledge base and publish p

Dec 12, 2022