Bad substitution in echo ${a:2:2} from a file

Bug #135863 reported by Antonio Luiz
4
Affects Status Importance Assigned to Milestone
dash (Ubuntu)
Invalid
Low
Unassigned

Bug Description

When I define a variable a in terminal, such as
$ a=water;
I can use the following comand
$ echo ${a:2:2}
te

But When I execute these steps from a file, it returns

 Syntax error: Bad substitution

This bug is simple, but I could not solve..........

          Thanks and with best

                    Antonio Luiz

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at [WWW] https://wiki.ubuntu.com/Bugs/FindRightPackage. I have classified this bug as a bug in dash

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Hi Antonio
as the log said, this is a syntax error, you could try to use bash instead of dash, anyway, i think this topic is more suitable for the answer module of launchpad, please post your question there, so everyone could benefit from the response.

Changed in dash:
status: New → Incomplete
assignee: nobody → sourcercito
Revision history for this message
Antonio Luiz (antluiz) wrote : Re:[Bug 135863] Re: Bad substitution in echo ${a:2:2} from a file

Hi Basilio,

            Thank you for the help............ I will post the question. And I will add another one, about 'ls'. Why does not work ls -d?

              Best

                Antonio

---------- Cabeçalho original -----------

De: <email address hidden>
Para: <email address hidden>
Cópia:
Data: Thu, 30 Aug 2007 16:19:13 -0000
Assunto: [Bug 135863] Re: Bad substitution in echo ${a:2:2} from a file

> Hi Antonio
> as the log said, this is a syntax error, you could try to use bash instead of dash, anyway, i think this topic is more suitable for the
answer module of launchpad, please post your question there, so everyone could benefit from the response.
>
> ** Changed in: dash (Ubuntu)
> Status: New => Incomplete
>
> ** Changed in: dash (Ubuntu)
> Assignee: (unassigned) => Basilio Kublik
>
> --
> Bad substitution in echo ${a:2:2} from a file
> https://bugs.launchpad.net/bugs/135863
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Changed in dash:
assignee: sourcercito → nobody
status: Incomplete → Invalid
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.