Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #boolean #bash
ADD COMMENT
Topic
Name
9+4 =