Professional Web Applications Themes

[Q] batch FTP program under CSH error ?? - Linux / Unix Administration

am writting a batch job under SUN Solaris 8. This batch job will "FTP" to LINUX server. It must something not compatible to "csh". Can anyone give me a hint? ============ batch program ccc.sh ==== #!/bin/csh -v ftp -n server02 <<EOF user user1 passwd1 pwd EOF ========= end batch program ==== run program: %./ccc.sh ftp -n server02 << EOF EOF: << terminator not found...

  1. #1

    Default [Q] batch FTP program under CSH error ??

    am writting a batch job under SUN Solaris 8. This batch job will "FTP" to LINUX
    server. It must something not compatible to "csh". Can anyone give me a hint?


    ============ batch program ccc.sh ====

    #!/bin/csh -v

    ftp -n server02 <<EOF
    user user1 passwd1
    pwd
    EOF


    ========= end batch program ====

    run program:

    %./ccc.sh


    ftp -n server02 << EOF
    EOF: << terminator not found




    aaa Guest

  2. #2

    Default Re: [Q] batch FTP program under CSH error ??

    On 5 Dec 2005 13:58:03 -0800, aaa <com> wrote: 

    This doesn't solve your scripting problem, but why not use scp -r ?
    It's more secure, and recurses.
    Dave Guest

  3. #3

    Default Re: [Q] batch FTP program under CSH error ??

    SSH not install under Solaris 8.


    In article <net>, Dave Hinz says... 
    >
    >This doesn't solve your scripting problem, but why not use scp -r ?
    >It's more secure, and recurses.[/ref]

    aaa Guest

  4. #4

    Default Re: [Q] batch FTP program under CSH error ??

    On 2005-12-05, aaa <com> wrote: 

    Why not instead shabang that puppy with a standard #!/bin/sh if you think
    its a csh problem. I dont know to many people anymore that like to script
    in csh but if thats what you really want then more power to you.

    --

    ( When in doubt, use brute force. -- Ken Thompson 1998 )
    wh1tef8 Guest

  5. #5

    Default Re: [Q] batch FTP program under CSH error ??

    On 2005-12-06, wh1tef8 <unix.admin> wrote: 
    >
    > Why not instead shabang that puppy with a standard #!/bin/sh if you think
    > its a csh problem. I dont know to many people anymore that like to script
    > in csh but if thats what you really want then more power to you.
    >[/ref]
    And not only that, I notice that your script allready has the wrong name.
    "ccc.sh ?" if your calling it as that then it might as well just be a sh
    script rather than csh.

    --

    ( When in doubt, use brute force. -- Ken Thompson 1998 )
    wh1tef8 Guest

  6. #6

    Default Re: [Q] batch FTP program under CSH error ??

    On 5 Dec 2005 17:27:42 -0800, aaa <com> wrote: 

    First, please don't top-post. It s up the flow of a conversation
    to have the answer before the question.

    Second, ssh installs quite nicely on Solaris 8. sunfreeware.com even
    has it precompiled if you don't have a coherent development environment.

    Dave Guest

  7. #7

    Default Re: batch FTP program under CSH error ??

    aaa wrote: 

    1) Rename it to ccc.csh. It is very corny to name a CSH script *.sh.

    2) Add lines to the bottom. Sometimes here-files don't work right if
    they terminate with an EOF instead of an EOL:

    ftp -n server02 <<EOF
    user user1 passwd1
    pwd
    EOF
    exit 0

    3) Fix your trailing whitespace. When I did the cut-n-paste to show
    the added line I noticed that both lines with the string "EOF" in
    them had trailing whitespace. Bzzzt! When doing a here-file do
    NOT have any trailing white space. The shell does a string-match
    and you don't want to mess with white space in string-match.

    Doug Guest

Similar Threads

  1. Only printing page 1 of a batch, foomatic rip error.
    By zzstasis1@gmail.com in forum Adobe Acrobat Macintosh
    Replies: 0
    Last Post: July 25th, 06:04 PM
  2. Replies: 1
    Last Post: May 17th, 02:14 PM
  3. Error Msg in Batch Process
    By GLMoore in forum Macromedia Fireworks
    Replies: 4
    Last Post: August 22nd, 12:53 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139