Skip to content

julien-f/shell-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Requirements

Only psl.sh.

How to use it?

Just type the following line to test your current shell:

. shell-info.sh

Or test another shell:

dash shell-info.sh

And here are the results for “dash”:

$((1 + 1))                    yes
--
${#VAR}                       yes
--
${VAR-word}                   yes
${VAR:-word}                  yes
${VAR=word}                   yes
${VAR:=word}                  yes
${VAR?word}                   yes
${VAR:?word}                  yes
${VAR+word}                   yes
${VAR:+word}                  yes
--
${VAR#pattern}                yes
${VAR##pattern}               yes
${VAR%pattern}                yes
${VAR%%pattern}               yes
--
${!VAR}                       no
${VAR/pattern/string}         no
${VAR//pattern/string}        no
${VAR^pattern}                no
${VAR^^pattern}               no
${VAR,pattern}                no
${VAR,,pattern}               no
${VAR:1}                      no
${VAR:1:1}                    no
--
$([[ $VAR == * ]])            no
$([[ $VAR =~ . ]])            no

Compatibility

shell-info is POSIX compliant and has been tested with the following shells:

  • bash
  • dash
  • ksh
  • zsh

About

A little script which test display various capabilities of the current shell.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages