Re: getjenux.sh script needs help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/29/24 22:42, Jude DaShiell wrote:
#!/usr/bin/env bash
# file: getjenux.sh - get jenux script
wget -bc -o jenux.log https://nashcentral.duckdns.org/projects/Jenux-2024.03.21-tripple.iso.sha512 &&
UPDATE='grep -ic error jenux.log'

You should use $() instead of '' for the value of the var or use the
grep CMD in the if itself.

if [ $UPDATE -gt 0]; then
echo "jenux likely had an update."

Please be mindful of the indentation ina conditional.

fi
wget -bc -a jenux.log https://nashcentral.duckdns.org/projects/Jenux-2024.03.26-tripple.iso
cut here.
As the script is now,
$UPDATE will increment each time ERROR is found in jenux.log.
What is not happening is the error message isn't appearing on the terminal

Because you are using the count option to grep.


and the script doesn't exit yet.

Use exit to do so.

--
John Doe

--
You received this message because you are subscribed to the Google Groups "blinux-list@xxxxxxxxxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blinux-list+unsubscribe@xxxxxxxxxx.




[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]