public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Parameter expansion stopped working in recent ash/dash
@ 2023-02-07 12:07 Andrey Repin
  2023-02-07 17:19 ` Brian Inglis
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Repin @ 2023-02-07 12:07 UTC (permalink / raw)
  To: All

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

Greetings, All!

In the attached script, that I always run using dash, the expansion is
supposed to strip leading/trailing spaces from provided parameter.

The upgrade that took place after which the expansion stopped working is

libsolv:   - dash-0.5.11.5-1.any -> dash-0.5.12-1.any

Downgrading to 0.5.11.5 restored the expected behavior.
I failed to find anything relevant in the dash 0.5.12 patch notes, but perhaps
community could help?


-- 
With best regards,
Andrey Repin
Tuesday, February 7, 2023 14:49:46

Sorry for my terrible english...

[-- Attachment #2: par-ext.sh --]
[-- Type: application/octet-stream, Size: 276 bytes --]

#!/bin/dash -x

trim() {
  # remove leading whitespace characters
  __trim="${*#${*%%[![:space:]]*}}"
  # remove trailing whitespace characters
  printf "%s" "${__trim%${__trim##*[![:space:]]}}"
}

trim " alpha" | od -t x1a
trim "beta " | od -t x1a
trim "\rgamma	" | od -t x1a

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-09 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 12:07 Parameter expansion stopped working in recent ash/dash Andrey Repin
2023-02-07 17:19 ` Brian Inglis
2023-02-07 19:01   ` Brian Inglis
2023-02-08 14:20     ` Brian Inglis
2023-02-09 12:08       ` Andrey Repin

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).