Sponsored Content
Top Forums Shell Programming and Scripting telnet shell script on red hat 9 cmd line only Post 302140491 by kypeswith on Friday 12th of October 2007 10:13:09 PM
Old 10-12-2007
Question telnet shell script on red hat 9 cmd line only

i would like to make a shell script (red hat 9 cmd line only)
to telnet to my local isp's webmail server on port 25 and send it commands
such as helo Smilie help would be much appreciated, and i found no posts similar that answered my question... the closest i've gotten to an answer from about 8 google searches is :
CODE:
#/usr/bash
( echo "helo" ) | telnet /*webserver*/ /*port*/ ;
CODE:
this code did not seem to do the job Smilie sadly...

i could manage in c++ possibly.. with some guidance but i'm trying to learn some shell programming, i've also given up on trying to do this with a doskey macro or a batch file on windows..
would someone please help me?
i'm using red hat 9 cmd line only (no gui package installed)

BTW: batch file code to do this would be awesome
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Red Hat shell

Good morning. I am using RedHat shell. when running the .out file of a program I wrote, I cannot see a terminal with the outputs. I know that the program runs, because the files to be changed are changed. how can I see the terminal (As I see it in windows)? Thanks, Ido. (2 Replies)
Discussion started by: ginodii
2 Replies

2. Linux

red hat ent 4 cron script

hi i need to put the full path of every executable i need to put on my script. on the testing you don't need it but if it's running from cron you need to put the full path of the executable or another script. what's the work around for this? Thanks. (1 Reply)
Discussion started by: itik
1 Replies

3. UNIX for Dummies Questions & Answers

script in Bash 2.05b.0(1) and 3.2.25(1) Red Hat

Hi I have this script #!/bin/bash cat status.txt | while read LINE do linija="$LINE" echo $linija echo $linija | awk '{print $1}' > temp.txt koj=`tail -1 temp.txt` echo $koj echo $linija | awk '{print $2}' > temp1.txt kolku=`tail... (7 Replies)
Discussion started by: Ruzeil
7 Replies

4. Red Hat

HELP - Resource/Performance Monitoring Script - Red Hat Enterprise Linux Server

Hi all, ------------------------- Linux OS Version/Release: ------------------------- Red Hat Enterprise Linux Server release 5.5 (Tikanga) Linux <hostname> 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux I have a server that hosts 30+ Oracle... (1 Reply)
Discussion started by: newbie_01
1 Replies

5. Red Hat

Red Hat or CentOS CMD

Hello, I'm a Solaris Admin by trade and we are getting more Linux server in. I was wondering what command Red Hat uses for hardware faults? lets say you see the fault light on the server what command do you use to see what the fault is? for example the Solaris command is fmadm faulty. this... (11 Replies)
Discussion started by: bitlord
11 Replies

6. Shell Programming and Scripting

Shell scripts migration from HP-Unix 11 to Red Hat Linux

We are changing our OS from HP-Unix 11 to Linux Red Hat. We have few k- shell, c - shell and sql scripts which are currently running under HP-Unix 11. Will these scripts work on LINUX as it is? or we need to do any code changes?IS there anyone who have done this kind of migration before?Thanks for... (2 Replies)
Discussion started by: Phoenix2
2 Replies

7. Shell Programming and Scripting

Red Hat and Ubuntu shell scripting

Are basic scripts in awk or bash or perl or other shell scripting languages the same in RHEL red hat as ubuntu? (1 Reply)
Discussion started by: cmccabe
1 Replies

8. UNIX for Beginners Questions & Answers

Red Hat: Error connecting using secure shell

Hi All, I am getting below error when I try to connect with ssh. Not sure why the error is on.I am able to connect from a different login from the same server (local: rhe/home/s3>) ssh acces1@91.1.12.102 Connection closed by 91.1.12.102 (local: rhe/home/s3>) ssh redhlinx102 Connection... (7 Replies)
Discussion started by: arunkumar_mca
7 Replies

9. UNIX for Beginners Questions & Answers

Another one line command where I'd like to determine if Ubuntu or Red Hat when running command

Hello Forum, I'm making very good progress on my report thanks to the very helpful people on this forum. I've been able to successfully create my report for my Red Hat servers. But I do have a few ubuntu servers in the mix and I'd like to capture some data from them when an ssh connection is... (8 Replies)
Discussion started by: greavette
8 Replies
ganeti-listrunner(8)						   Version 2.5.2					      ganeti-listrunner(8)

NAME
ganeti-listrunner - Run commands in parallel over multiple machines SYNOPSIS
ganeti-listrunner -l logdir {-x executable | -c shell-cmd} {-f hostfile | -h hostlist} [-a aux-file] [-b batch-size] [-u username] [-A] DESCRIPTION
ganeti-listrunner is a tool to run commands in parallel over multiple machines. It differs from dsh or other tools in that it asks for the password once (if not using ssh-agent) and then reuses the password to connect to all machines, thus being easily usable even when public key authentication or Kerberos authentication is not available. It can run either a command or a script (which gets uploaded first and deleted after execution) on a list of hosts provided either via a file (one host per line) or as a comma-separated list on the commandline. The output (stdout and stderr are merged) of the remote execution is written to a logfile. One logfile per host is written. OPTIONS
The options that can be passed to the program are as follows: -l logdir The directory under which the logfiles files should be written. -x executable The executable to copy and run on the target hosts. -c shell-cmd The shell command to run on the remote hosts. -f hostfile The file with the target hosts, one hostname per line. -h hostlist Comma-separated list of target hosts. -a aux-file A file to copy to the target hosts. Can be given multiple times, in which case all files will be copied to the temporary directory. The executable or the shell command will be run from the (temporary) directory where these files have been copied. -b batch-size The host list will be split into batches of batch-size which will be processed in parallel. The default if 15, and should be increased if faster processing is needed. -u username Username to connect as instead of the default root username. -A Use an existing ssh-agent instead of password authentication. --args Arguments to pass to executable (-x). EXIT STATUS
The exist status of the command will be zero, unless it was aborted in some way (e.g. ^C). EXAMPLE
Run a command on a list of hosts: listrunner -l logdir -c "uname -a" -h host1,host2,host3 Upload a script, some auxiliary files and run the script: listrunner -l logdir -x runme.sh -a seed.dat -a golden.dat -h host1,host2,host3 SEE ALSO
dsh(1), cssh(1) REPORTING BUGS
Report bugs to project website (http://code.google.com/p/ganeti/) or contact the developers using the Ganeti mailing list (ganeti@google- groups.com). SEE ALSO
Ganeti overview and specifications: ganeti(7) (general overview), ganeti-os-interface(7) (guest OS definitions). Ganeti commands: gnt-cluster(8) (cluster-wide commands), gnt-job(8) (job-related commands), gnt-node(8) (node-related commands), gnt- instance(8) (instance commands), gnt-os(8) (guest OS commands), gnt-group(8) (node group commands), gnt-backup(8) (instance import/export commands), gnt-debug(8) (debug commands). Ganeti daemons: ganeti-watcher(8) (automatic instance restarter), ganeti-cleaner(8) (job queue cleaner), ganeti-noded(8) (node daemon), ganeti-masterd(8) (master daemon), ganeti-rapi(8) (remote API daemon). Ganeti htools: htools(1) (generic binary), hbal(1) (cluster balancer), hspace(1) (capacity calculation), hail(1) (IAllocator plugin), hscan(1) (data gatherer from remote clusters). COPYRIGHT
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc. Permission is granted to copy, distribute and/or modify under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. Ganeti ganeti-listrunner(8)
All times are GMT -4. The time now is 10:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy