Re: Bash substrings – just can’t figure it out…



On Tue, 31 Jan 2012 19:07:20 +0100
Johnny Rosenberg <gurus.knugum@xxxxxxxxx> wrote:

I have an example here:
File="03. Rock Nuts.flac"
echo "${File##N*s}"

The result should be ”03. Rock .flac”, shouldn't it? Obviously not,
because the result is ”03. Rock Nuts.flac”, which is exactly the
original string.
So what am I missing?

Knowing little about BASH, I'm nevertheless immediately drawn to the
fact that your example is missing the space you wish in our output.

Cybe R. Wizard
--
Strength through Unity.
Unity through faith.
Adam Sutler

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: was (one more thing I want to show the public and court)
    ... No matter how long you do this, ... weakness that the gaps get filled in by actual scientists doing real ... They claim that the missing pieces came in on a meteor. ... Now by saying essentially that a big rock just fell out ...
    (talk.origins)
  • Re: was (one more thing I want to show the public and court)
    ... No matter how long you do this, ... weakness that the gaps get filled in by actual scientists doing real ... They claim that the missing pieces came in on a meteor. ... Now by saying essentially that a big rock just fell out ...
    (talk.origins)
  • Re: Bash substrings =?UTF-8?B?4oCT?= just =?UTF-8?B?Y2Fu4oCZdA==?= figure it =?UTF-8?B?b
    ... Rock Nuts.flac" ... echo "$" ... So what am I missing? ... Strength through Unity. ...
    (Ubuntu)
  • Re: Missing fish at night
    ... I was lucky, ended up with none missing, but I could see where he'd ... couldn't get a firm purchase on my loose rock so it was pulled in, ... with the rock. ... Pond was trashed. ...
    (rec.ponds)
  • Re: Missing fish at night
    ... My guess is a raccoon but it is the first one in 5 years for this new ... I was lucky, ended up with none missing, but I could see where he'd ... couldn't get a firm purchase on my loose rock so it was pulled in, ... with the rock. ...
    (rec.ponds)