quick question for anyone who has made a tomato script

Discussion in 'Tomato Firmware' started by david101, Apr 23, 2009.

  1. david101

    david101 Addicted to LI Member

    this is driving me nuts...literally lol

    it seems like the only way i can get a script running is by having everything on one line, which is a pain to deal with if i want a larger script...

    i.e. i make a .sh file, login with SSH and browse to my cifs1 folder. i type:

    sh myscript.sh

    and it will complain because of the spaces/tabs/whatever. i tried all combination, with ;, etc. it just won't work. no idea what i'm doing wrong or if it is just really really picky? i'm goin crazy here lol...

    if anyone could just post a small snippet with while/if statements that works i could just look at the syntax and figure it out...i guess..lol

    thanks in advance
  2. mstombs

    mstombs Network Guru Member

    Make sure all your scripts are saved with unix style line endings, notepad++ can do this - windows notepad doesn't, windows wordpad usually preserves line endings. Various text based file transfer programs often unhelpfully convert for you!
  3. david101

    david101 Addicted to LI Member

    thanks, that was the problem...lol

    i was using notepad++ and tried notepad under suspicion for something like that, but i guess because since i made the file in windows it used the windows format. i converted and i viewed all the characters, and it makes sense now :p

    thanks for the reply!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice