Sponsored Content
Top Forums Shell Programming and Scripting how to extract last word and a number from a string Post 302601534 by mahirzukic2 on Friday 24th of February 2012 12:31:35 AM
Old 02-24-2012
Code:
wget http://dynamicdns.park-your-domain.com/update?host=mail&domain=DOMAIN&password=PASSWORD -O >> /home/user/DYN_DNS_IP_change.log

This is exactly how I execute it, or some other variations of parameters given to wget.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl newbie: how to extract an unknown word from a string

hi, im quite new to perl regexp. i have a problem where i want to extract a word from a given string. but the word is unknown, only fact is that it appears as the second word in the string. Eg. input string(s) : char var1 = 'A'; int var2 = 10; char *ptr; and what i want to do is... (3 Replies)
Discussion started by: wolwy_pete
3 Replies

2. Shell Programming and Scripting

How to extract variable number from a String

hi,I am new to shell script,I have String,like this: Number of rows exported: 5321 the numbe at end could changing,how can I extract this number and assign it to a variable,then use it later in script. thanks. (19 Replies)
Discussion started by: vitesse
19 Replies

3. Shell Programming and Scripting

Extract single or multi word string in Cshell

I am using the following code: set LASInputFile = `ls *. | head -1` set COMPLine = `grep -i :COMPANY $LASInputFile` to extract the following line from my input file: COMP. XYZ Public Company :COMPANY NAME I now need to extract the full name of the company which... (15 Replies)
Discussion started by: phudgens
15 Replies

4. Shell Programming and Scripting

Extract number that comes after a given string

Hi! I have a file that contains non-regular strings like: SCSGTI:N="$4,0,1,4,34622991111-->RemoteSPC: 1111", NWID=1; SCSGTI:N="$4,0,1,4,34622991211-->RemoteSPC: 1211", NWID=1; SCSGTI:N="$4,0,1,4,*-->RemoteSPC: 2112,Sec:RemoteSPC: 2212", NWID=1; SCSGTI:N="$4,10,1,4,34622999213-->RemoteSPC:... (4 Replies)
Discussion started by: Flavius
4 Replies

5. Shell Programming and Scripting

Extract string from multiple file based on line count number

Hi, I search all forum, but I can not find solutions of my problem :( I have multiple files (5000 files), inside there is this data : FILE 1: 1195.921 -898.995 0.750312E-02-0.497526E-02 0.195382E-05 0.609417E-05 -2021.287 1305.479-0.819754E-02 0.107572E-01 0.313018E-05 0.885066E-05 ... (15 Replies)
Discussion started by: guns
15 Replies

6. Shell Programming and Scripting

Using SED to extract a word or string.

I am working with the ksh shell in HP UNIX and I am attempting to extract a word, beginning with a particular string and ending at the first space. for example I want to extract the word or string MS_RECENT_ACTIVITY from the following string " This has been entered in MS_RECENT_ACTIVITY the... (2 Replies)
Discussion started by: simpletech369
2 Replies

7. Shell Programming and Scripting

Extract First and matching word from string in UNIX

Thank you (2 Replies)
Discussion started by: Pratik Majithia
2 Replies

8. Shell Programming and Scripting

Extract number part from the string in ksh 88

I have to extract number part (Date and timestamp part ) from the following 3 strings AB_XYZA_20130930183017.log AB_DY_XYZA_20130930183017.log AB_GZU_20130930183017.log Output should be 20130930183017 Please help me to get the string like above Thanks (2 Replies)
Discussion started by: smile689
2 Replies

9. Shell Programming and Scripting

Command to extract word from a string

Hi All, I have a word and from that word would like to search for certain set of string, is there any command to do so ? EX : Components from the above word, would like to search for strings set and extract the search string and then do if stmt... pon nen ent Com say... (2 Replies)
Discussion started by: Optimus81
2 Replies

10. Shell Programming and Scripting

Extract number from string.

Hi I am on Sun os. I have data in the below format and I need to grab the number out from the string. O/p needed: ---------- Post updated at 12:39 PM ---------- Previous update was at 12:32 PM ---------- I tried this but I am getting . at the front (14 Replies)
Discussion started by: dsravanam
14 Replies
relaytest(1)						      General Commands Manual						      relaytest(1)

NAME
relaytest - attempt to use SMTP to relay to a DSBL-compliant host SYNOPSIS
relaytest [-v] <ip address[:port]> DESCRIPTION
relaytest attempts to connect to the specified <ip address> on the specified port (default is port 25) and uses a variety of tests to attempt to relay through the host. In the tests below, source.com is sender_domain from dsbl.conf(5) and sender is sender_user. Non-domain-specific tests: MAIL FROM:<sender@source.com> RCPT TO:<listme@dsbl.org> MAIL FROM:<sender@source.com> RCPT TO:<"listme@dsbl.org"> MAIL FROM:<sender@source.com> RCPT TO:listme@dsbl.org MAIL FROM:<sender@source.com> RCPT TO:<dsbl.org!listme> MAIL FROM:<nobody> RCPT TO:<listme@dsbl.org> MAIL FROM:<nobody> RCPT TO:<"listme@dsbl.org"> MAIL FROM:<nobody> RCPT TO:listme@dsbl.org MAIL FROM:<nobody> RCPT TO:<dsbl.org!listme> MAIL FROM:<source.com!sender> RCPT TO:<listme@dsbl.org> MAIL FROM:<source.com!sender> RCPT TO:<"listme@dsbl.org"> MAIL FROM:<source.com!sender> RCPT TO:listme@dsbl.org MAIL FROM:<source.com!sender> RCPT TO:<dsbl.org!listme> MAIL FROM:<> RCPT TO:<listme@dsbl.org> MAIL FROM:<> RCPT TO:<"listme@dsbl.org"> MAIL FROM:<> RCPT TO:listme@dsbl.org MAIL FROM:<> RCPT TO:<dsbl.org!listme> relaytest then builds a list of possible domains, including "[127.0.0.1]", "localhost", [<ip address>], and any other domains that can be derived from reverse DNS of the IP or the SMTP greeting. Domain specific tests: MAIL FROM:<nobody@DOMAIN> RCPT TO:<listme@dsbl.org> MAIL FROM:<nobody@DOMAIN> RCPT TO:<"listme@dsbl.org"> MAIL FROM:<nobody@DOMAIN> RCPT TO:listme@dsbl.org MAIL FROM:<nobody@DOMAIN> RCPT TO:<listme%dsbl.org@DOMAIN> MAIL FROM:<nobody@DOMAIN> RCPT TO:<listme%dsbl.org> MAIL FROM:<nobody@DOMAIN> RCPT TO:<"listme%dsbl.org"> MAIL FROM:<nobody@DOMAIN> RCPT TO:<listme@dsbl.org@DOMAIN> MAIL FROM:<nobody@DOMAIN> RCPT TO:<"listme@dsbl.org"@DOMAIN> MAIL FROM:<nobody@DOMAIN> RCPT TO:<@DOMAIN:listme@dsbl.org> MAIL FROM:<nobody@DOMAIN> RCPT TO:<dsbl.org!listme> MAIL FROM:<nobody@DOMAIN> RCPT TO:<dsbl.org!listme@DOMAIN> MAIL FROM:<DOMAIN!nobody> RCPT TO:<dsbl.org!listme> MAIL FROM:<DOMAIN!nobody> RCPT TO:<dsbl.org!listme@DOMAIN> MAIL FROM:<nobody@DOMAIN> RCPT TO:<listme@dsbl.org> MAIL FROM:<postmaster@DOMAIN> RCPT TO:<listme@dsbl.org> MAIL FROM:<administrator@DOMAIN> RCPT TO:<listme@dsbl.org> MAIL FROM:<sales@DOMAIN> RCPT TO:<listme@dsbl.org> MAIL FROM:<info@DOMAIN> RCPT TO:<listme@dsbl.org> MAIL FROM:<webmaster@DOMAIN> RCPT TO:<listme@dsbl.org> MAIL FROM:<listserv@DOMAIN> RCPT TO:<listme@dsbl.org> relaytest then tries a variety of SMTP AUTH methods to try to relay a message through the target server. The envelopes used for these tests are always: MAIL FROM:<sender@source.com> RCPT TO:<listme@dsbl.org> The SMTP AUTH methods tried are as follows: AUTH LOGIN, user=/webmaster, password=(null) AUTH LOGIN, user=admin, password=admin AUTH LOGIN, user=administrator, password=(null) AUTH LOGIN, user=test, password=test AUTH NTLM (anonymous) OPTIONS
-v Verbose mode. Details of the SMTP transaction are written to standard output. AUTHOR
Ian Gulliver <ian@penguinhosting.net> SEE ALSO
dsbl.conf(5), spamtrap(1) 2002-04-03 relaytest(1)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy