Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Shell or perl Script to log into terminals ??

    I am new to linux and would like to learn some more about scripts, they look really great. I have set a goal for myself to try to lean some form of scripting but I don't know if I should try a regular bash script or perl. I really don't know where to start.

    I would like to have a decicated PC (RH7.3) start dialing out (/dev/ttyS0) at 00:00 to a list of terminals and when connected send a command SH. Whatever the output is would go into a folder (dial out 1-10 go into folder rich, 11-15 go to danea etc.) Then I have a bunch of terminals that can not take incoming phone calls but can do outgoing starting at "x" hour and persist untill' it connects and downloads the output of the SH command (by the way only 1 text page). Then once everything is done I want to use SENDMAIL to e-mail over SMTP the contents of each folder to a user associated to each folder. I also know I would need to enter this script in a CRON job.

    It sounds from what I have read that it should be somewhat simple. SystemAdmins use sendmail to forward files every night via scripts, I just want to forward folders instead. The tough part for me is how do I set up the part where I command a modem to dial up, send a command, read and save the output then disconnect and move on to the next one.

    I have spent the last 2 hours searching google for scripts and modem scripts and all I see is stuff for PPP. In this case I don't need to dial into a ISP and establish an IP address, I need to dial into a old fashoned terminal.

    Any suggestions ?? Books ?? I got 5 days vacation on a small island coming up in 2 weeks and could use some book suggestions.


  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    I'm currently learning perl and it's a great language for scripting. There are commands to do pretty much anything and the syntax is fairly easy to remember.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

Posting Permissions

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