Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 02d1707

Browse files
author
Matthew McCullough
committed
Improved treelive to accept parameters
1 parent c9faaa4 commit 02d1707

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

treelive

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
#!/bin/bash
22

3+
#Ensure we have the quantity specified on the CLI
4+
if [ -z "$1" ]; then ARG_ERR=ERR; fi
5+
if [ -n "$ARG_ERR" ];
6+
then
7+
echo "Usage: treelive <depth>"
8+
echo "Usage: treelive <depth> <OTHERTREEARGS>"
9+
exit
10+
fi
11+
12+
DEPTH=$1
13+
314
while :
415
do
516
clear
6-
tree $*
17+
tree -L $*
718
sleep 2
819
done

0 commit comments

Comments
 (0)