bash undocumented syntax error

Linux for blind general discussion blinux-list at
Sun Jan 13 22:13:08 UTC 2019

On Sun, 13 Jan 2019, Linux for blind general discussion wrote:

> file integrity checking when the time is right.
> Here's some code:
> #!/usr/bin/env bash
> # file: - download latest slint iso.
> if [ -f wget-log ];
> rm wget-log

It looks like you solved this, but I believe this should be (it's been 
awhile since I've done this):

if [ -f wget-log ]
   then rm wget-log

for a one-liner like this, you could just as easily write:

[ -f wget-log ] && rm wget-log


test -f wget-log && rm wget-log

>   wget -bc --tries=inf --max-redirect=10000 --trust-server-names
>   until [ tail -2 wget-log|grep "saved" ]; do
> sleep 5
> 	 done
> sha256sum -c slint64-

NOt sure exactly why you're doing this.  It looks like you're putting wget 
in the background, then waiting around until it finishes.  So why 
background it at all?


More information about the Blinux-list mailing list