[Shell Scripting] Syntax Error

Discussion in 'Programming General' started by Pseudo123, Oct 10, 2011.

[Shell Scripting] Syntax Error
  1. Unread #1 - Oct 10, 2011 at 2:04 PM
  2. Pseudo123
    Joined:
    Dec 13, 2010
    Posts:
    682
    Referrals:
    0
    Sythe Gold:
    0

    Pseudo123 Apprentice
    Banned

    [Shell Scripting] Syntax Error

    Below is my code:
    Code:
    echo ----- START -----
    for xx in `ls submissions/*`
    do
            filename=$xx
            echo " main:"$filename
    done
    echo ----- END -----
    
    Below is my error:
    Code:
    syntax error near unexpected token `do
    `do
    
    Any ideas?
     
  3. Unread #2 - Oct 10, 2011 at 3:48 PM
  4. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    [Shell Scripting] Syntax Error

    Works fine for me using bash. What shell are you using?
     
  5. Unread #3 - Oct 10, 2011 at 4:32 PM
  6. Pseudo123
    Joined:
    Dec 13, 2010
    Posts:
    682
    Referrals:
    0
    Sythe Gold:
    0

    Pseudo123 Apprentice
    Banned

    [Shell Scripting] Syntax Error

    That is really weird...
     
< Finding highest value in a HashMap issue: | Cheat Macro Community Project >

Users viewing this thread
1 guest


 
 
Adblock breaks this site