Displaying 3 results from an estimated 3 matches for "last_char".
Did you mean:
last_chars
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Propagate EXP_QPAT in subevalvar
...Tue, Aug 28, 2012 at 01:27:24PM +0000, Todor Vlaev wrote:
>
> While playing around with parameter expansion I noticed that the
> following didn't work in dash (dash 0.5.5.1-7.4ubuntu1) as compared
> to bash even though I believe it should be POSIX-compliant:
>
> my_str=swan; last_char="${my_str#${my_str%?}}"; echo ${last_char}
>
> If the double quotes are removed, the last character is printed correctly.
>
> At a quick glance through the commits after the 0.5.5.1 release I saw
> the following bug fix. Could it be related?
>
> 0d7d66039b614b642c7754...
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Propagate EXP_QPAT in subevalvar
...Tue, Aug 28, 2012 at 01:27:24PM +0000, Todor Vlaev wrote:
>
> While playing around with parameter expansion I noticed that the
> following didn't work in dash (dash 0.5.5.1-7.4ubuntu1) as compared
> to bash even though I believe it should be POSIX-compliant:
>
> my_str=swan; last_char="${my_str#${my_str%?}}"; echo ${last_char}
>
> If the double quotes are removed, the last character is printed correctly.
>
> At a quick glance through the commits after the 0.5.5.1 release I saw
> the following bug fix. Could it be related?
>
> 0d7d66039b614b642c7754...
2016 Sep 30
2
[PATCH] customize: Add --append-line.
...+ if String.find content "\r\n" >= 0 then "\r\n"
+ else if String.find content "\n" >= 0 then "\n"
+ else default_newline () in
+
+ let line = line ^ newline in
+
+ (* Do we need to append a newline to the existing file? *)
+ let last_chars =
+ let len = String.length newline in
+ if size <= 0L then newline (* empty file ends in virtual newline *)
+ else if size >= Int64.of_int len then
+ g#pread path len (size -^ Int64.of_int len)
+ else
+ g#pread path len 0L in
+ let line =
+ if last_...