help-bash
[Top][All Lists]
Advanced

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

Re: line 50 : unexpected end of file - cant find the fault ..


From: alex xmb sw ratchev
Subject: Re: line 50 : unexpected end of file - cant find the fault ..
Date: Fri, 16 Aug 2024 13:49:31 +0200

On Fri, Aug 16, 2024, 13:24 Greg Wooledge <greg@wooledge.org> wrote:

> On Fri, Aug 16, 2024 at 12:26:42 +0200, alex xmb sw ratchev wrote:
> > i was coding and now my script ( to run / log ollama ( open source ai sw
> )
> > ) but i got error unexpected end of file , and i cant find the fault
> > i searched for matching ' , " , { / } , $ , no luck ..
> > it is 49 lines long
> >
> > hope for fix ..
>
> 1) Show the actual error message.
>

~ $ . xmbashuserin.4
bash: xmbashuserin.4: line 50: syntax error: unexpected end of file
~ $ bash xmbashuserin.4
xmbashuserin.4: line 50: syntax error: unexpected end of file
~ $ bash --version
GNU bash, version 5.2.32(1)-release (aarch64-unknown-linux-android)

2) Line 32 has 1-= where I believe you wanted 1= .
>

1- i want , as its a kill cmd , minus

That said, I have absolutely no idea how your "${a[@]}" expansion
> is supposed to work.  You're doing this:
>

simple cmdname ( aliasname ) = code

hobbit:~$ unset -v a
> hobbit:~$ a=(00=' echo ' 1d=' hello ')
> hobbit:~$ declare -p a
> declare -a a=([0]="00= echo " [1]="1d= hello ")
> hobbit:~$ set -x
> hobbit:~$ : "${a[@]}"
> + : '00= echo ' '1d= hello '
>

i dont understand , i dont : .. i alias ..

What in the HELL is that?
>
> Wait... is the left-hand side (00 or 1d) supposed to be the name of an
> alias that you're defining??
>

yes

If you want to define two dozen aliases, why not just do this?
>
>     alias \
>         00=' stdbuf -i 0 -o 0 -e 0 -- ' \
>         1d=' OLLAMA_DEBUG=0 ... ' \
>         ...
>

its ugly and non functional
noob users dont know to \ every line
i chosen array cause its simpler to edit inside
and call is also just one

Then people might actually have a CHANCE of understanding what the code
> is doing.
>
> For that matter, why are you defining a command named 00?
>

its a stdbuf make-non-buffering ,
its a base cmd , so npt 5 or 6 but 0 , and another 0 cause its too specific

You know what... never mind that.  I don't think I want to know.  The
> answer would just be even more confusing than this script-library-thing.
>

im sorry mate

:))

>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]