From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29296 invoked by alias); 31 Jan 2012 23:56:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16747 Received: (qmail 21340 invoked from network); 31 Jan 2012 23:56:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=WoPsQjpc+/ZPUJFlj6fYDWp0WCKtxJsZf13ngBRI9e8=; b=kj6nsfra8kUZMeUalQ/buhHmfnuMagqsJIBuavr3Ey47ah/vBkf2E0yEVcFwx8njCp kafsMAIuci7rk/bMV0Du/Sb7+4BC9+d4yCYE0KIV0I8yinYWf6z00eqzchpI7eb+640f G/rtmMJ4NjqvjV7ZD3iDyibfHXl/pvd0Xq2Lg= MIME-Version: 1.0 From: TJ Luoma Date: Tue, 31 Jan 2012 18:55:34 -0500 Message-ID: Subject: Arrays with each item on one line To: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 I don't understand arrays very well and am trying to learn. I keep trying to do things like this: FILES=("$HOME/Library/Application Support/Keyboard Maestro" "$HOME/Library/Preferences/com.stairways.keyboardmaestro.editor.plist" "$HOME/Library/Preferences/com.stairways.keyboardmaestro.engine.plist" "$HOME/Library/Preferences/com.stairways.keyboardmaestro.plist") for F in $FILES do command ls -ld "$F" done but instead of $F being each line for 4 iterations of the loop, I get all 4 lines x 4 times. I thought that the solution was changing IFS, so I tried: IFS=' ' and IFS=$'\n' but that doesn't seem to change anything. Can someone tell me what I'm missing? Thanks TjL Zsh version 4.3.11 on Mac OS X/10.7