Add bash scripts
This commit is contained in:
14
scripts/path.sh
Normal file
14
scripts/path.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
read -rp "Path: " input_path
|
||||
|
||||
|
||||
if [[ -f "$input_path" ]]; then
|
||||
echo "It's a file."
|
||||
elif [[ -d "$input_path" ]]; then
|
||||
echo "It's a directory."
|
||||
else
|
||||
echo "It's neither."
|
||||
fi
|
||||
Reference in New Issue
Block a user