On Mon, Oct 06, 2014 at 04:04:25PM -0700, Linda Walsh wrote:
> Greg Wooledge wrote:
> >netdev_pat=... # (and other variable assignments)
> >(cd "$sysnet" &&
> >for ifname in ...; do
> >hwaddr=$(<"$ifname"/address)
> >act_hw2if[$hwaddr]="$ifname"
> >act_if2hw[$ifname]="$hwaddr"
> >done)
On Monday, October 06, 2014 02:00:47 PM Linda Walsh wrote:
>
> Greg Wooledge wrote:
> > On Mon, Oct 06, 2014 at 12:38:21PM -0700, Linda Walsh wrote:
> >> According to Chet , only way to do a multi-var assignment in bash is
> >>
> >> read a b c d <<<$(echo ${array[@]})
It's best to avoid turning
On 10/6/14, 3:14 PM, Linda Walsh wrote:
> In running a startup script, I am endeavoring not to use tmp files
> where possible, As part of this, I sent the output of a command
> to stdout where I read it using the "variable read" syntax:
>
>while read ifname hwaddr; do
>printf "ifname=%
On 10/6/14, 3:38 PM, Linda Walsh wrote:
> Greg Wooledge wrote:
>> On Mon, Oct 06, 2014 at 12:14:57PM -0700, Linda Walsh wrote:
>>>done <<<"$(get_net_IFnames_hwaddrs)"
>>
>>> Where am I using a HERE doc?
>>
>> <<< and << both create temporary files.
>
>
> According to Chet , only way to do a m
On 10/6/14, 5:00 PM, Linda Walsh wrote:
>> You are working in a severely constrained environment.
> That isn't the problem: the assignment using a tmp file is:
>> strace -p 48785 -ff
> Process 48785 attached
> read(0, "\r", 1)= 1
> write(2, "\n", 1)
On 10/6/14, 6:03 PM, Linda Walsh wrote:
> Not sure how but this went off into space, sorta...
>
> Greg Wooledge wrote:
>> On Mon, Oct 06, 2014 at 12:14:57PM -0700, Linda Walsh wrote:
>>>done <<<"$(get_net_IFnames_hwaddrs)"
>>
>>> Where am I using a HERE doc?
>>
>> <<< and << both create tempor
On 10/7/14, 2:07 AM, Linda Walsh wrote:
> I thought I was getting rid of this bogus problem (which shouldn't
> be a problem anyway -- since it's just another pipe but with parent receiving
> the data instead of child receiving it) by storing it in a variable
> transfer form
> <<<($VAR)... cuz was
On 10/6/14, 6:16 PM, John E. Malmberg wrote:
>>> Do you mean return ""; ?
>>
>> Yes, good catch. It doesn't make a difference: clang and gcc both accept
>> it as written and it behaves as desired. However, I'll change it for the
>> next version.
>
> Changing it to return 0 instead of '\0' would
On 10/7/14, 8:55 AM, Dan Douglas wrote:
>> Um... it used a socket.. to transfer it, then it uses a tmp file on top
>> of that?! :
>
> That's the wrong process. AF_NETLINK is the interface used by iproute2 for
> IPC
> with the kernel. Bash doesn't use netlink sockets.
It's syslog. Some vendor
2014-09-30 17:06:22 +0100, Stephane Chazelas:
[...]
> $ env -i $'a\necho test\na=b' bash -c 'export -p'
> declare -x OLDPWD
> declare -x PWD="/home/stephane"
> declare -x SHLVL="1"
> declare -x a
> echo test
> a
[...]
Just reiterating in case that had gone unnoticed earlier:
$ env 'a;echo OOPS;:
Chet Ramey wrote:
On 10/7/14, 8:55 AM, Dan Douglas wrote:
Um... it used a socket.. to transfer it, then it uses a tmp file on top
of that?! :
That's the wrong process. AF_NETLINK is the interface used by iproute2 for IPC
with the kernel. Bash doesn't use netlink sockets.
It's syslog. Som
On Tue, Oct 07, 2014 at 09:54:21AM -0700, Linda Walsh wrote:
> Chet Ramey wrote:
> >It's syslog. Some vendors integrated patches that log all shell commands
> >to syslog.
> >
> No... that wasn't syslog, it was strace in another terminal where I attached
> the bacsh that was doing the various types
Greg Wooledge wrote:
OK, then use a function to give you an escapable block:
declare -A ...
create_maps() {
cd "$sysnet" || return
for ifname in ...; do
hwaddr=$(<"$ifname"/address)
act_hw2if[$hwaddr]="$ifname"
act_hw2if[$ifname]="$hwaddr"
done
}
create_maps
On Tue, Oct 07, 2014 at 10:45:53AM -0700, Linda Walsh wrote:
> I appreciate the options, but the option I want is the parent staying
> "put", and only sending children out to change dir's. Say some new
> version of init wants to isolate init processes by putting them in their
> own dir and t
On Tue, Oct 7, 2014 at 8:45 PM, Linda Walsh wrote:
>
>
> Greg Wooledge wrote:
>
>> OK, then use a function to give you an escapable block:
>>
>> declare -A ...
>> create_maps() {
>> cd "$sysnet" || return
>> for ifname in ...; do
>> hwaddr=$(<"$ifname"/address)
>> act_hw2i
On 10/7/14, 1:45 PM, Linda Walsh wrote:
> There is no fundamental reason why, say, process substitution needs to
> use /dev/fd or /proc/anything -- and couldn't operate exactly like piped
> processes do now. On my first implementation of multiple IPC programs,
> I've used semaphores, message queu
Chet Ramey wrote:
On 10/7/14, 1:45 PM, Linda Walsh wrote:
There is no fundamental reason why, say, process substitution needs to
use /dev/fd or /proc/anything -- and couldn't operate exactly like piped
processes do now. On my first implementation of multiple IPC programs,
I've used semaphore
Pierre Gaston wrote:
That's where you are wrong, there is no reason for *your* use case, but the
basic idea behind process substitution is to be able to use a pipe in a
place where you normally need a file name.
Well, that's not what I needed it for. I needed to read from a child
process tha
Chet Ramey wrote:
> On 10/6/14, 6:16 PM, John E. Malmberg wrote:
>
> >>> Do you mean return ""; ?
> >>
> >> Yes, good catch. It doesn't make a difference: clang and gcc both accept
> >> it as written and it behaves as desired. However, I'll change it for the
> >> next version.
> >
> > Changing
On 10/7/14, 5:35 PM, Linda Walsh wrote:
>
>
> Chet Ramey wrote:
>> On 10/7/14, 1:45 PM, Linda Walsh wrote:
>>
>>> There is no fundamental reason why, say, process substitution needs to
>>> use /dev/fd or /proc/anything -- and couldn't operate exactly like piped
>>> processes do now. On my first
On 10/7/14, 6:31 PM, Ángel González wrote:
>>> Changing it to return 0 instead of '\0' would probably be more clear.
>>> No need to return a pointer to a static empty string.
>>
>> It depends on how you want the function to work. It is nice to
>> differentiate between the cases where there is no
On 10/7/14, 12:28 PM, Stephane Chazelas wrote:
> Since those environment variables cannot be mapped to shell
> variables, they should not be included in the output of "export
> -p".
Thanks. This will be fixed in the next release of bash.
> I can see there are a number of bugs at savannah
> (htt
Chet Ramey wrote:
On 10/6/14, 6:03 PM, Linda Walsh wrote:
Not sure how but this went off into space, sorta...
Greg Wooledge wrote:
On Mon, Oct 06, 2014 at 12:14:57PM -0700, Linda Walsh wrote:
done <<<"$(get_net_IFnames_hwaddrs)"
Where am I using a HERE doc?
<<< and << both create tempor
23 matches
Mail list logo