Parameters for quickread are ready

This commit is contained in:
dmarakom6 2021-07-06 11:13:45 +03:00
parent 4342571adc
commit 7f3457ffb5
3 changed files with 16 additions and 1 deletions

View file

@ -17,6 +17,9 @@ function quickread() {
;;
-s | --sort )
. ~/.shellnotes/util/quickread/s/s.sh
;;
*)
echo "Invalid parameter." #"\nUSAGE:\nquickread -r/-s -> FILE\nquickread -l -> LINE, FILE"
;;
esac
return 0
@ -29,7 +32,8 @@ function quickread() {
export line=$2
export notename=$3
else
export notename=$3
export option=$1
export notename=$2
fi
check_params
return 0

View file

@ -4,3 +4,9 @@ shellnotes - r.sh
Released under the "All rights reserved" category. See the RIGHTS.txt file
in /docs/github/ for its full text.
info
if [ -f $DEFAULT_PATH/$notename ]; then
tac $DEFAULT_PATH/$notename
else
echo "No such note."
fi

View file

@ -5,3 +5,8 @@ Released under the "All rights reserved" category. See the RIGHTS.txt file
in /docs/github/ for its full text.
info
if [ -f $DEFAULT_PATH/$notename ]; then
sort $DEFAULT_PATH/$notename
else
echo "No such note."
fi