Answers for "return boolean bash"

0

return boolean bash

#!/bin/bash
isdirectory() {
  if [ -d "$1" ]
  then
    true
  else
    false
  fi
}

if isdirectory $1; then echo "is directory"; else echo "nopes"; fi
Posted by: Guest on April-26-2021

Code answers related to "return boolean bash"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language