14 lines
328 B
Bash
Executable File
14 lines
328 B
Bash
Executable File
#!/bin/bash
|
|
LINES=25
|
|
while getopts ":n:" opt; do
|
|
case $opt in
|
|
n) LINES="$OPTARG"
|
|
;;
|
|
\?) echo "Unrecognized option -$OPTARG. Usage: node-red-log [-n lines]. For example: node-red-log -n 50" >&2 && exit 1
|
|
;;
|
|
esac
|
|
done
|
|
echo -e '\033]2;'Node-RED log'\007'
|
|
echo " "
|
|
sudo journalctl -f -n $LINES -u nodered -o cat
|