Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Posts
    232

    Arrow Unanswered: If statement syntax error

    I was trying out if statement with 2 files already existing
    #/bin/sh
    if [ -w all ]
    then
    cat newscript >> pld
    if [ $? -eq 0 ]
    then
    echo "Succesfull appended filename all"
    else
    echo "Failed to append new data"
    fi
    fi

    i get an error
    if : expression syntax


    Any suggestion thanks
    bigfoots

  2. #2
    Join Date
    Apr 2004
    Location
    Boston, MA
    Posts
    325
    try:

    #!/bin/sh

  3. #3
    Join Date
    Oct 2003
    Posts
    232
    Dammmmmmmmmmmmmm Me


    thanks
    bigfoots

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •