22 Ağustos 2021 Pazar tarihinde Hunter Wittenborn <
hun...@hunterwittenborn.com> yazdı:
>
> Well I'm expecting '(' to be part of the shell's syntax (when unquoted; so
> likewise not cause a syntax error), but when looking at things like the
> left side of a variable assignment, I'm sure you'll agre
On 8/21/21 1:28 AM, Emanuele Torre wrote:
Bash Version: 5.1
Patch Level: 8
Release Status: release
get_epochrealtime() casts tv.tv_sec (a time_t a.k.a. int) to unsigned
int causing EPOCHREALTIME to not behave correctly before the Unix Epoch.
The definition is seconds since the Unix epoch.
why disregard or invalid, mark 0 is that date, less is minus, .. all working
On Sun, Aug 22, 2021, 22:13 Chet Ramey wrote:
> On 8/21/21 1:28 AM, Emanuele Torre wrote:
>
> > Bash Version: 5.1
> > Patch Level: 8
> > Release Status: release
> >
>
> > get_epochrealtime() casts tv.tv_sec (a time_t a.
On 8/21/21 6:02 PM, Hunter Wittenborn wrote:
As an end user I would expect the unquoted `('
operator to cause a syntax error, just as it does in `echo ('.
Well I'm expecting '(' to be part of the shell's syntax (when unquoted; so
likewise not cause a syntax error), but when looking at thi
as i said how to make it work, last time again, one pair quotes, not more
On Sun, Aug 22, 2021, 22:37 Chet Ramey wrote:
> On 8/21/21 6:02 PM, Hunter Wittenborn wrote:
> >> As an end user I would expect the unquoted `('
> >
> >> operator to cause a syntax error, just as it does in `echo ('.
> >
>
On Sun, Aug 22, 2021, at 4:38 PM, Alex fxmbsw7 Ratchev wrote:
> last time again
You promise?
> one pair quotes, not more
Except you're wrong.
$ val=foo
$ declare "$val"='x'
$ declare -p "$val"
declare -- foo="x"
$ val=bar
$ declare -a "$val"='(baz quux)'
$ declare -p "$val"
declare -a bar=([0]
yea i dunno to say, i dont care, peace..
On Sun, Aug 22, 2021, 22:48 Lawrence Velázquez wrote:
> On Sun, Aug 22, 2021, at 4:38 PM, Alex fxmbsw7 Ratchev wrote:
> > last time again
>
> You promise?
>
> > one pair quotes, not more
>
> Except you're wrong.
>
> $ val=foo
> $ declare "$val"='x'
> $ de
It would be nice to have a parameter transformation (e.g. "${par@p}")
that expands $par to a string that will not be expanded by PS1, PS2, &c.
example:
tmp_var=$(blabla) # this variable will not exist when PS1 is expanded
PS1="blabla ${tmp_var@p} blabla"
I think a valid way to achieve the sa
what about @Q
and renoving the beginning and ending ' s
On Sun, Aug 22, 2021, 23:13 Emanuele Torre wrote:
> It would be nice to have a parameter transformation (e.g. "${par@p}")
> that expands $par to a string that will not be expanded by PS1, PS2, &c.
>
> example:
>
> tmp_var=$(blabla) # thi
On Sun, Aug 22, 2021 at 10:30:26PM +0200, Alex fxmbsw7 Ratchev wrote:
> why disregard or invalid, mark 0 is that date, less is minus, .. all working
It's not that simple. Calendars get really *interesting* if you go
farther back in history. The switch from the Julian to the Gregorian
calendar di
That is not at all the same thing.
$ t='~' q='?' s='*' n=$'\n' bn='\n'
$ a="hello ${t@Q} ${q@Q} ${s@Q} ${n@Q} ${bn@Q} hi"
$ printf '%s\n' "${a@P}"
hello '~' '?' '*' $'
' '
' hi
With the parameter transformation I requested, this is what should be printed:
$ t='~' q='?' s='*' n=$'\n
Alex fxmbsw7 Ratchev wrote:
> and renoving the beginning and ending ' s
even if you remove the first and last ':
1) that is 3 PEs as the solution i described (${a//\\/}
${a//\`/\\\`} ${a//$/\\$} vs ${a@Q} ${a#\'} ${a%\'} )
2) it doesn't actually accomplish anything:
~ --${@Q}-> '~' --${#\'
Emanuele Torre wrote:
> ~ --${@Q}-> '~' --${#\'}-> ~' --${%\'}-> ~
Sorry, that was a bad example. Still, it does not accomplish anything:
\w --${@Q}-> '\w' --${#\'}-> \w' --${%\'}-> \w
On Sun, 22 Aug 2021 at 23:56, Emanuele Torre wrote:
>
> Alex fxmbsw7 Ratchev wrote:
> > and renoving the
i meant this with removing quotes
~ $ shopt -s extglob ; a=( . a \' \$var $'\e[1m' ) ps='$ ' a=( "${a[@]@Q}"
) ; for i in ${!a[@]} ; do a[i]=${a[i]#?(\$)\'} a[i]=${a[i]%\'} ; done ;
ps+=${a[*]} ; printf %s\\n "$ps"
$ . a \ $var \E[1m
~ $
On Mon, Aug 23, 2021, 00:02 Emanuele Torre wrote:
> Emanu
lol undefined behavior, tho its important to test such important
functionality, as setting time back
bad book by the live of 'use your computer only so'
im just saying nowadays as earlier software is more ugly bugs than useful
On Sun, Aug 22, 2021, 23:28 Greg Wooledge wrote:
> On Sun, Aug 22,
oh indeed it doesnt do what you want
maybe printf %q does
sorry
On Mon, Aug 23, 2021, 00:45 Alex fxmbsw7 Ratchev wrote:
> i meant this with removing quotes
>
> ~ $ shopt -s extglob ; a=( . a \' \$var $'\e[1m' ) ps='$ ' a=( "${a[@]@Q}"
> ) ; for i in ${!a[@]} ; do a[i]=${a[i]#?(\$)\'} a[i]=${a[i]
a bit better
~ $ a=( \' \\ \$var $'\e[1m' ) ps='$ ' ; printf -v q %q\ "${a[@]}" ;
ps+=$q ; printf %s\\n "$ps"
$ \' \\ \$var $'\E[1m'
On Mon, Aug 23, 2021, 00:50 Alex fxmbsw7 Ratchev wrote:
> oh indeed it doesnt do what you want
> maybe printf %q does
> sorry
>
> On Mon, Aug 23, 2021, 00:45 Ale
On Sun, 22 Aug 2021 16:13:28 -0400
Chet Ramey wrote:
> On 8/21/21 1:28 AM, Emanuele Torre wrote:
>
> > Bash Version: 5.1
> > Patch Level: 8
> > Release Status: release
> >
>
> > get_epochrealtime() casts tv.tv_sec (a time_t a.k.a. int) to unsigned
> > int causing EPOCHREALTIME to not behave co
On 8/22/21 7:52 PM, Kerin Millar wrote:
On Sun, 22 Aug 2021 16:13:28 -0400
Chet Ramey wrote:
On 8/21/21 1:28 AM, Emanuele Torre wrote:
Bash Version: 5.1
Patch Level: 8
Release Status: release
get_epochrealtime() casts tv.tv_sec (a time_t a.k.a. int) to unsigned
int causing EPOCHREALTIME
On 2021/08/19 02:15, Ilkka Virta wrote:
$ declare -A A=([foo bar]="123 456" [adsf]="456 789")
$ printf "<%s>\n" "${A[@]@K}"
Interesting. I wonder, what's the intended use-case for this?
---
Does it matter?: Organizing data.
In this case, the data may be organized by pairs.
If you have a l
2021年8月23日(月) 10:54 L A Walsh :
> On 2021/08/19 02:15, Ilkka Virta wrote:
> > $ declare -A A=([foo bar]="123 456" [adsf]="456 789")
> > $ printf "<%s>\n" "${A[@]@K}"
> >
> >
> > Interesting. I wonder, what's the intended use-case for this?
> >
> ---
> Does it matter?: Organizing data.
I'd guess I
2021年8月23日(月) 6:13 Emanuele Torre :
> It would be nice to have a parameter transformation (e.g. "${par@p}")
> that expands $par to a string that will not be expanded by PS1, PS2, &c.
It seems to me that you can just put '$par' (not "$par") in PS1.
Then, the suggested "${par@p}" can be simply '$par
> On Aug 22, 2021, at 10:22 PM, Koichi Murase wrote:
>
> 2021年8月23日(月) 6:13 Emanuele Torre :
>> It would be nice to have a parameter transformation (e.g. "${par@p}")
>> that expands $par to a string that will not be expanded by PS1, PS2, &c.
>
> It seems to me that you can just put '$par' (not "
On Sun, Aug 22, 2021 at 10:33:13PM -0400, Lawrence Velázquez wrote:
> An example in the original post asserted that tmp_var "will not
> exist when PS1 is expanded", so it must be inserted when PS1 is
> defined. This requirement seems pretty contrived to me (why can't
> tmp_var be kept around, exac
On 2021/08/22 19:14, Koichi Murase wrote:
I'd guess Ilkka has asked the use case for this particular output
format, i.e., the quoted fields inside a single word. If the purpose
is organizing the data, I would naturally expect the result in the
following more useful format in separate words wi
2021年8月23日(月) 13:40 L A Walsh :
>
> On 2021/08/22 19:14, Koichi Murase wrote:
> > I'd guess Ilkka has asked the use case for this particular output
> > format, i.e., the quoted fields inside a single word. If the purpose
> > is organizing the data, I would naturally expect the result in the
> > fo
26 matches
Mail list logo