The script must wait some arguments or parameter according this telnet session over TARGET.
For example my script in PHP:
*******************************************
cat Dispatch_pre.php
#!/usr/local/bin/php -q
<?php
function traer_archivo()
{
$ftp_server="10.2.15.80";
$conn_id =...
HI PHV, Do You can help me with this issue?
In directory DIR1 I have a FILE1.txt which is being updated in diferent times. And when this file is new, MySession execute all commands included in this FILE1.txt.
I need keep alive this sesion to this specific port. How I can get it?
Thanks a lot.
Hey Guys,
I need your timely help!
I need establish a telnet session in one device, and keep alive this connection and performe some commands over this seesion.
How I can develop this script in order to connect to my 2device?
I have FILE1
#MOBILE $MESSAGE
I need check if this file exist and if it exists I need perform something with each line starting with #MOBILE, because later FILE1 will be removed and created with other different datas. And script must be checking if FILE1 exist.
How I can setup last script...
I modified myscript but when it perform read LINE command, dont work, it stay in standby state, look
--------------------------------------
#!/bin/ksh
AA=`date +'%Y'`
MM=`date +'%m'`
DD=`date +'%d'`
ruta=/oracle/rdbms/log
fecha=$AA$MM$DD
MATCH="Current"
tail -f $ruta/alert_atel.log...
Hey SamBones, I need your help again.
I need read line by line a File, and when match some info with grep then does something, why: i.e.
#!/bin/ksh
tail -f File1.lis | while read LINE
error=`grep "something on LINE" LINE`
if [ -n $error] then
#print LINE which match error...
I change the script in typo's and add new info
print "submit\n$MOBILE\n\n5710000001\n\n\n\n\n\n\n\n\n\n\n\n$MSG\ny\nexit\n\"|
sms_operator >/dev/null 2>&1
but have problems with 35 line. why?
---------------------------------------------
[smsadm@smsbog]$vi data3...
PHV, i have other issues, please review this info. Thanks a lot.
[smsadm@smsbog]$sh -x data3
+ alias SMOperator=sms_operator
+ path1=/usr/EBS/ADCSoftware/smsadm/Alex
+ awk -F, {
printf "ip[%d]=\"%s\";inf[%d]=\"%s\"\n",NR,$1,NR,$0
}...
When I run script, i can see an error at line 4
[smsadm@smsbog]$sh -x data3
+ alias SMOperator=sms_operator
+ path1=/usr/EBS/ADCSoftware/smsadm/Alex
data3[4]: 0403-057 Syntax error at line 4 : `(' is not matched.
I have some problems. I use KSH and have problems with 2 variable, why:
if [ -z $a ]
if [ -n $a ]
How I can configure these 2 lines:
May be $a must be "$a",
a => some characteres
and I need know when $a is different to 0 and equal to 0 in long of chars, in order to check...
PHV Ok It looks good, thanks a lot, but i have one problem in myscript with some variable (ARRIBA=1), is it possible you can check and tellme why dont works 2nd part of my script when IP add is down and get UP.
Thank you...
PHV thanks a lot. I vahe this info
cat ip_add.txt
192.168.28.2 , VoiceMail
192.168.32.3 , Avisor Internet SMS Comtor
172.28.3.10 , Avisor Operadora Teledatos
172.28.3.11 , Avisor Operadora Teledatos
10.2.78.36 , PC Alex
And I need get 1st field (IP add) SUCCESSFUL, and
get all line IPADD +...
How I can create a function that read line by line a file, and this data can be included in other script and performed activity, then continue with 2nd line.
FILE 1
192.168.23.4 Hola
198.65.45.6 Mundo
FILE 2 Script
get file 1 column 1 = 192.168.23.4
execute something with 192.168.23.4...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.