Jérôme REYBERT wrote:
> I bind the "menu-complete" command to key with the following line
> in my .bashrc:
> bind '"\t"':menu-complete
>
> menu-complete is a bash command. It allows to bash to display in a
> different way completions. Instead of display a list of completion,
> possible completion
Yang Zhang wrote:
> Why does assigning to multiple variables on the same line exhibit
> sequential consistency normally but not for local variables?
Because `local' is a command, and word expansion is performed on its
arguments before it's invoked. This means the expansion is performed
before `lo
Why does assigning to multiple variables on the same line exhibit
sequential consistency normally but not for local variables?
#!/usr/bin/env bash
f() {
local a=$1 b=$a
c=0 d=$c
echo $b
echo $d
}
f x
# Output:
# b=
# d=0
--
Yang Zhang
http://www.mit.edu/~y_z/
Chris F.A. Johnson wrote:
> (Using 4.0.28(2)-release on Linux and 4.0.24(0)-release on FreeBSD.)
>
> Given this script:
>
> delay=0
> read -sn1 v
> read -sn1 -t "$delay" w
> read -sn1 -t "$delay" x
>
> if I press the up arrow, which generates '\e[A', I would have
> expected $
BuraphaLinux Server a écrit :
> Not exactly what you asked for, but works the same:
>
> #! /bin/bash
> today() {
> date
> }
>
> printf "today is %s\n" "$(today)"
> exit 0
>
> It is easier to just use $(date) directly though.
More direct, but less flexible.
printf "arbitrary date is %s\n" "$