* bash undocumented syntax error @ Linux for blind general discussion ` Linux for blind general discussion 0 siblings, 1 reply; 6+ messages in thread From: Linux for blind general discussion @ UTC (permalink / raw) To: blinux-list The man page has nothing on unexpected end of file in it; searching for unexpected in that man page provides no mention of unexpected. -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bash undocumented syntax error bash undocumented syntax error Linux for blind general discussion @ ` Linux for blind general discussion ` Linux for blind general discussion ` Linux for blind general discussion 0 siblings, 2 replies; 6+ messages in thread From: Linux for blind general discussion @ UTC (permalink / raw) To: Linux for blind general discussion On Sun, 13 Jan 2019, Linux for blind general discussion wrote: > The man page has nothing on unexpected end of file in it; searching for > unexpected in that man page provides no mention of unexpected. Possibly I've missed the context for this if it's a new thread resulting from a previous one (I am not up-to-date on this list). The error seems pretty self-explanatory. Bash expected more input when it reached the end. I would expect that it was either looking for a closing quote (single or double) or a closing bracket of some sort. what are you trying to do? Cheers, Geoff. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bash undocumented syntax error ` Linux for blind general discussion @ ` Linux for blind general discussion ` Linux for blind general discussion ` Linux for blind general discussion 1 sibling, 1 reply; 6+ messages in thread From: Linux for blind general discussion @ UTC (permalink / raw) To: blinux-list Yeah, an error of this type is hard enough to debug when you have access to the buggy code. Debugging from the error message alone is nearly impossible in cases like this. I will mention, however, that bash, and many other shells/scripting languages, aren't picky about single quotes versus double quotes in general, but can be quite picky that they're used consistently. E.g. if you start a string literal with single quotes, you'd better end it with single quotes, and if you start it with double quotes, you'd better end it with double quotes, but bash probably doesn't care which you use as long as the beginning and ending delimiters are the same. Probably about the best advice I can give without examining the code directly. -Jeff On 1/13/19, Linux for blind general discussion <blinux-list@redhat.com> wrote: > On Sun, 13 Jan 2019, Linux for blind general discussion wrote: > >> The man page has nothing on unexpected end of file in it; searching for >> unexpected in that man page provides no mention of unexpected. > > Possibly I've missed the context for this if it's a new thread resulting > from a previous one (I am not up-to-date on this list). > > The error seems pretty self-explanatory. Bash expected more input when it > reached the end. > > I would expect that it was either looking for a closing quote (single or > double) or a closing bracket of some sort. > > what are you trying to do? > > Cheers, > Geoff. > > _______________________________________________ > Blinux-list mailing list > Blinux-list@redhat.com > https://www.redhat.com/mailman/listinfo/blinux-list > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bash undocumented syntax error ` Linux for blind general discussion @ ` Linux for blind general discussion 0 siblings, 0 replies; 6+ messages in thread From: Linux for blind general discussion @ UTC (permalink / raw) To: blinux-list Hi Jeff, On Sun, 13 Jan 2019 18:44:14 +0000 Linux for blind general discussion <blinux-list@redhat.com> wrote: > Yeah, an error of this type is hard enough to debug when you have > access to the buggy code. Debugging from the error message alone is > nearly impossible in cases like this. > > I will mention, however, that bash, and many other shells/scripting > languages, aren't picky about single quotes versus double quotes in > general, but can be quite picky that they're used consistently. E.g. > if you start a string literal with single quotes, you'd better end it > with single quotes, and if you start it with double quotes, you'd > better end it with double quotes, but bash probably doesn't care which > you use as long as the beginning and ending delimiters are the same. > see https://stackoverflow.com/questions/6697753/difference-between-single-and-double-quotes-in-bash - they have different semantics. > Probably about the best advice I can give without examining the code directly. > > -Jeff > > On 1/13/19, Linux for blind general discussion <blinux-list@redhat.com> wrote: > > On Sun, 13 Jan 2019, Linux for blind general discussion wrote: > > > >> The man page has nothing on unexpected end of file in it; searching for > >> unexpected in that man page provides no mention of unexpected. > > > > Possibly I've missed the context for this if it's a new thread resulting > > from a previous one (I am not up-to-date on this list). > > > > The error seems pretty self-explanatory. Bash expected more input when it > > reached the end. > > > > I would expect that it was either looking for a closing quote (single or > > double) or a closing bracket of some sort. > > > > what are you trying to do? > > > > Cheers, > > Geoff. > > > > _______________________________________________ > > Blinux-list mailing list > > Blinux-list@redhat.com > > https://www.redhat.com/mailman/listinfo/blinux-list > > > > _______________________________________________ > Blinux-list mailing list > Blinux-list@redhat.com > https://www.redhat.com/mailman/listinfo/blinux-list -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ The Case for File Swapping - http://shlom.in/file-swap Only wimps use tape backup: real men just upload their important stuff on FTP, and let the rest of the world mirror it. — https://en.wikiquote.org/wiki/Linus_Torvalds Please reply to list if it's a mailing list post - http://shlom.in/reply . ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bash undocumented syntax error ` Linux for blind general discussion ` Linux for blind general discussion @ ` Linux for blind general discussion ` Linux for blind general discussion 1 sibling, 1 reply; 6+ messages in thread From: Linux for blind general discussion @ UTC (permalink / raw) To: Linux for blind general discussion On Sun, 13 Jan 2019, Linux for blind general discussion wrote: > Date: Sun, 13 Jan 2019 13:08:06 > From: Linux for blind general discussion <blinux-list@redhat.com> > To: Linux for blind general discussion <blinux-list@redhat.com> > Subject: Re: bash undocumented syntax error file integrity checking when the time is right. Here's some code: #!/usr/bin/env bash # file: getslint.sh - download latest slint iso. if [ -f wget-log ]; rm wget-log wget -bc --tries=inf --max-redirect=10000 --trust-server-names https://sourceforge.net/projects/slint/files/latest/download until [ tail -2 wget-log|grep "saved" ]; do sleep 5 done sha256sum -c slint64-14.2.1.1.sha256sum > > On Sun, 13 Jan 2019, Linux for blind general discussion wrote: > > > The man page has nothing on unexpected end of file in it; searching for > > unexpected in that man page provides no mention of unexpected. > > Possibly I've missed the context for this if it's a new thread resulting from > a previous one (I am not up-to-date on this list). > > The error seems pretty self-explanatory. Bash expected more input when it > reached the end. > > I would expect that it was either looking for a closing quote (single or > double) or a closing bracket of some sort. > > what are you trying to do? > > Cheers, > Geoff. > > _______________________________________________ > Blinux-list mailing list > Blinux-list@redhat.com > https://www.redhat.com/mailman/listinfo/blinux-list > -- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: bash undocumented syntax error ` Linux for blind general discussion @ ` Linux for blind general discussion 0 siblings, 0 replies; 6+ messages in thread From: Linux for blind general discussion @ UTC (permalink / raw) To: Linux for blind general discussion 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: getslint.sh - 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 fi for a one-liner like this, you could just as easily write: [ -f wget-log ] && rm wget-log or test -f wget-log && rm wget-log > wget -bc --tries=inf --max-redirect=10000 --trust-server-names https://sourceforge.net/projects/slint/files/latest/download > until [ tail -2 wget-log|grep "saved" ]; do > sleep 5 > done > sha256sum -c slint64-14.2.1.1.sha256sum 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? Cheers, Geoff. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
bash undocumented syntax error Linux for blind general discussion
` Linux for blind general discussion
` Linux for blind general discussion
` Linux for blind general discussion
` Linux for blind general discussion
` Linux for blind general discussion
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).