Unix script does not execute correctly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Newbie19
    New Member
    • Jun 2007
    • 122

    Unix script does not execute correctly

    I'm a little new at Unix Scripting, but I was able to get a program to work, but when I added a new section to it, the new section failed to execute.

    The main goal of the script is to copy a directory and then compress using tar and then send via ftp to another unix machine.

    Here is the section that fails to execute:

    usage(){
    tar cvzf test.tgz $targetdir

    echo "What machine would you like to send these files?"

    read $name

    transferftp test.tbz $name
    }

    Any ideas?

    Thanks,

    Newbie19
  • Newbie19
    New Member
    • Jun 2007
    • 122

    #2
    figured it out, I had a syntaxs error in a pervious part of the code that caused the program to execute without me knowning and didn't pick up till I was debugging in that area.

    Thanks,

    Newbie19

    Comment

    Working...