Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: malpa
  • Order by date
  1. malpa

    Graph the selection of a html table row

    ...me where to start. start writing the code with awk and bash shell. #!/bin/bash # set -x OUTPUT="file.out" DIR="/tmp/" cd ${DIR} FILEIN=`ls -1 *D* | tail -1` echo ${FILEIN} >${DIR}${OUTPUT} echo "<style type=\"text/css\">" >> ${DIR}${OUTPUT} echo "th " >> ${DIR}${OUTPUT} echo "{" >>...
  2. malpa

    block incoming snmp traps from ip

    Hi there Question It could be that the comment shadowed in red color, is the issue ?? systemctl status iptables.service ● iptables.service - IPv4 firewall with iptables Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled) [highlight...
  3. malpa

    block incoming snmp traps from ip

    Hi there I am trying to block snmp incomming traffic from ip "xx.xx.xx.xx", using iptables but i dont understand why it is not done by the operating system REL. trying with this iptables -A INPUT -s 10.250.2.235 -p udp --destination-port 162 -j DROP iptables -A INPUT -s 10.250.2.235 -j DROP...
  4. malpa

    sed script

    ...from it, that I am trying to do, is taking the first field, some information of the 3 and 4 fields, using sed. the separator of this fields is an "*". log_xx.xml <msg time='2016-11-03T05:52:36.591-05:00' org_id='oracle' comp_id='tnslsnr' type='UNKNOWN' level='16' host_id='tgestion1'...
  5. malpa

    Read pcap file and filter smpp protocol

    Hi I am using tshark to edit pcap file. I am searching a way to read a file and filter smpp protocol. This is the comand line that I used to. tshark -nr 20140508_11_1.pcap -T text -V -O smpp > 20140508_11_1.text But I cant get the result. I appreciate your comments about it. Thanks a lot...
  6. malpa

    WARNING: terminal not capable of 'window' mode

    Hi the issue was solved. send "\rexport TERM=xterm\r" send "stty rows 35 columns 150\r" malpa
  7. malpa

    WARNING: terminal not capable of 'window' mode

    Hi I added this line to the program. send "\rexport TERM=xterm\r" now I can see the output of the command, going well. The issue now, is that the output is truncated to 4 columns Output DataSource st cong PduLost CL_ALL_PTT_CAL-IMF-1E_Upgd_ixp0001_419850-10.83.65.10:34516 A No...
  8. malpa

    WARNING: terminal not capable of 'window' mode

    ...contain the issue. I do not know if this issue is related with the ssh server o ssh client, expect script or TERM enviorment bash. send "routeDisp\n" set timeout 2 while (1) { expect { timeout { send "\003";break} "." {send "\003";break} } } expect "*user " Any suggestion Thanks...
  9. malpa

    WARNING: terminal not capable of 'window' mode

    ...the issue is: send "routeDisp\n" set timeout 2 while (1) { expect { timeout { send "\003";break} "." {send "\003";break} } } expect "*user " Script. #!/usr/bin/expect -f set length [string length $comando] if {$length != 0} { spawn ssh -Y root@10.83.xx.xx expect {...
  10. malpa

    at job

    .../usr/tmc/su - ${USER} <<EOF > ${HOME}/traza.log at -s -m -f ${PathNewDir}${file}.sh ${HORA} ${A_DATEF[1]} ${A_DATEF[2]},${A_DATEF[4]} atq EOF ************************************ the output of the traza.log file commands will be excecuted using /bin/sh job xxxxxxxxxx.a Day Month Day...
  11. malpa

    at job

    Hi When I run a bash shell manually, it functions well, but when i run it, using at command i have a problem with the "if" cicle. #!/usr/bin/bash /usr/tmc/su - ${USER} <<EOF > ${HOME}/traza.log at -s -m -f ${PathNewDir}${file}.sh ${HORA} ${A_DATEF[1]} ${A_DATEF[2]},${A_DATEF[4]} atq EOF...
  12. malpa

    Build associative array

    LKBrwnDBA, Thanks a lot for your feedback The script funtions well. But I would like to built a variable "val" (associative array), before to use awk. After to build this variable, pass it to awk. The size of the val is variable, it depends of the amount of fields. this variable val contain...
  13. malpa

    Build associative array

    Thanks a lot LKBrwnDBA I made some changes declare -a array array=( "$@" ) len=${#array[@]} file=${array[$len-1]} args=${array[@]:0:$len-1} echo "file: $file" echo "Argumentos antes de $file son: $_args" for ((i=0;i<$( expr ${#array[@]} - 1 );i++));do echo "${array[$i]}" if [...
  14. malpa

    Build associative array

    Hi I want to print a header and report with the fields selected. The issue is that my programm does not print the values. my initial script awk -v fields="1,2,3,4,5" ' BEGIN{ #header array n[1]="ID" ... n[103]="lastField" l=split(fields,ARR,",") for ( i=1;i<=l;i++){ printf i==l...
  15. malpa

    extract table from outlook email

    ...".16.", ".18.", ".21.", ".23.", ".25.", ".27.", ".29.", ".31.", ".33.", ".35.") 'Pattern ' myPattern = "<[^>]*>" myPattern1 = "<o\:p>\&nbsp\;<\/o\:p>" myPattern1 = "<o\:p>\&nbsp\;<\/o\:p><\/span><\/font><\/p> *<\/td> *<\/tr>" myPattern2 = Chr(13)...
  16. malpa

    extract table from outlook email

    Hi I receive a lot of emials. That i Want is identify a html format, to export valules that comes into a table, to a excel application, automatically. I am running this script like a rule. The problem is that my initial scrpit, not function when the table into email with html format, comes in...
  17. malpa

    ? Why an associative array is modified, after executing a function?

    Hi I found the problem. Three days after. I made a mistake I change this while ( (getline < "file.csv") > 0 ) for while ( (getline tmp < "file.csv") > 0 ) that is all. thanks malpa
  18. malpa

    ? Why an associative array is modified, after executing a function?

    ...when I want to print this array via a function, I have no problem. this array is populate whit a file that contain this structure file.txt ******** begin data fin ******** begin data fin ******** But if I include into the print cycle another function to capture a record of a file, the...
  19. malpa

    On liner STDIN

    Hi Im decoding a binary file, this file has this structure HEx bc 08 00 50 00 31 48 27 20 83 ff ff ff ff 03 87 40 55 90 20 11 07 31 05 04 29 00 00 02 75 00 00 00 00 01 21 00 16 bc 08 00 50 00 31 34 56 93 90 ff ff ff ff 03 87 40 55 90 20 11 07 31 05 09 00 00 00 00 30 00 00 00 00 01 21 00 16 I...
  20. malpa

    awk does not fuction into crontab

    Hi Annihilannic I made many mistakes you are rigth """This is most likely because it is running with different environment settings, especially the PATH. Try setting (and exporting) the value of PATH at the beginning of programm.sh, using a similar value to the one that you have in your...

Part and Inventory Search

Back
Top