#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13

    automate telnet/ftp session with csh?


    Hi everyone,

    Is it possible to write csh/sh script to do some automate telnet or ftp session?
    Help me, help you, help others...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    190
    Yes. i never tried telnet, but i did succesfully for ftp.
    you can just pipe commands to it, e.g.
    Code:
    (
    echo "open ftp.microsoft.com"
    echo "user ftp"
    echo "pass ftp@localhost"
    echo "get /pub/file"
    echo "bye"
    ) | ftp
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13

    Thumbs up


    Thank You
    Help me, help you, help others...
  6. #4
  7. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    3,608
    Rep Power
    27
    A .netrc file will probably help you as well (for ftp, that is) -> http://www.mavetju.org/unix/netrc.php

    //NoXcuz
    UN*X is sexy!
    who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

IMN logo majestic logo threadwatch logo seochat tools logo