bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IFS as the control variable in a for loop


From: Grisha Levit
Subject: IFS as the control variable in a for loop
Date: Mon, 2 May 2016 15:06:50 -0400

When in a non-interactive shell, IFS, when modified as the control variable in a for loop does not change splitting behavior.
$ bash -c 'for IFS in .; do printf "%s\n" "$IFS" "$*"; done' bash x x
.
x x

$ bash -ic 'for IFS in .; do printf "%s\n" "$IFS" "$*"; done' bash x x
.
x.x

reply via email to

[Prev in Thread] Current Thread [Next in Thread]