Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17
You also need a semicolon after the closing bracket....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Engineer
    Join Date
    Jan 2005
    Location
    Chicago (USA)
    Posts
    1,028

    You also need a semicolon after the closing bracket.

  2. #12
    Just Joined!
    Join Date
    Nov 2005
    Location
    University of Bath, UK
    Posts
    8
    Thanks for the help a thing & scm but i'm still getting the unexpected end of file errors even with your modifications.

  3. #13
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    Try this:

    Code:
    #!/bin/bash     <----- &#40;change if necessary&#41;
    
    # The following is for illustration - the existance of arguments 1, 2, and 3 is assumed...
    ARG1=$1;shift
    ARG2=$1;shift
    ARG3=$1;shift
    
    for ARGX;
    do
      for DIGIT in 1 2 3;
      do
        subst -n $ARG1 -p "$DIGIT" -i "$ARGX" $ARG3 > ../output/$ARG2/subst.codon/$ARGX.$DIGIT.txt;
      done
    done

  4. #14
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Quote Originally Posted by Boggy667
    Thanks for the help a thing & scm but i'm still getting the unexpected end of file errors even with your modifications.
    Look at lines 21 and 22 of your script.

    You also don't need any of the semicolons you've put in the script.

  5. #15
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    hmm, i always use something like this:
    Code:
    if &#91; ! $4 &#93;; then
     echo "no argument given.."
    else
     echo "argument is '$4' "
    fi
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

  6. #16
    Just Joined!
    Join Date
    Nov 2005
    Location
    University of Bath, UK
    Posts
    8
    Hey everyone thanks for all your help, i'm using the code that ISOS suggested and it's working perfectly - thanks soo much.

    And for some reason (i'm not sure why) even the #!/bin/bash line is behaving

  7. #17
    Just Joined!
    Join Date
    Nov 2005
    Location
    Decatur - Illinois
    Posts
    1
    Hey All ! ( My first Post ! )
    After reading this thread last night , I started refining a simple bash script I had written , only to have the dreaded:
    Code:
    line 5&#58; syntax error&#58; unexpected end of file
    show up ( another First for Me ! )

    I found a partial answer here:
    http://linuxcommand.org/wss0100.php
    Page down to " Missing quotes "

    I finally got it to work with
    Code:
    if &#91; -e QS1 &#93;
        then ./mac_qd -cif QS1|tail -n11|head -n6 ; echo "*QS1*"
    fi
    the " if " was looking for a " fi " and hit the end of the file before finding it !

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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