Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

EXEC peculiarities



I am a recent convert from Bash, and I'm confused about the behavior of
the 'exec' builtin. (zsh 4.2.0 on Linux)

#! /bin/bash
EXEC='/sbin/ifconfig eth0'
exec $EXEC

returns the expected output; the configuration of eth0

#! /bin/zsh
EXEC='/sbin/ifconfig eth0'
exec $EXEC

returns: "no such file or directory: /sbin/ifconfig eth0"

#! /bin/zsh
EXEC='/sbin/ifconfig'
ARGS='eth0'
exec $EXEC $ARGS

however, again works as expected

Am I doing something wrong? Why does the 2nd example fail?





Messages sorted by: Reverse Date, Date, Thread, Author