grep on '-141-' should be sufficient. The backslash or the double minus sign prevents grep to treat the regexp as an option, but not all versions of grep support them both:
I have following content in the file
CancelPolicyMultiLingual3=U|PC3|EN
RestaurantInfoCode1=U|restID1|1
.....
I am trying to use following matching extression
\|(+)
to get this
PC3|EN
restID1|1
Obviously it does not work.
Any ideas? (13 Replies)
Hi Gurus,
I need help with regular expressions. I want to create a regular expression which will take only alpha-numeric characters for 7 characters long and will throw out an error if longer than that.
i tried various combinations but couldn't get it, please help me how to get it guys.
... (2 Replies)
Hello,
Let say I have a string with content "Free 100%". How can extract only "100" using ksh? I would this machanism to work if instead of "100" there is any kind of combination of numbers(ex. "32", "1238", "1"). I want to get only the digits.
I have written something like this:
... (4 Replies)
Hi,
below is a piece of code written by my predecessor at work.
I'm kind of a newbie and am trying to figure out all the regular expressions in this piece of code.
It is really a tough time for me to figure out all the regular expressions.
Please shed some light on the regular expressions... (3 Replies)
In regular expressions with grep(or egrep), ^ works if we want something in starting of line..but what if we write ^^^ or ^ for pattern matching??..Hope u all r familiar with regular expressions for pattern matching.. (1 Reply)
#!/usr/bin/perl
$word = "one last challenge";
if ( $word =~ /^(\w+).*\s(\w+)$/ )
{
print "$1";
print "\n";
print "$2";
}
The output shows that "$1" is with result one and "$2" is with result challenge. I am confused about how this pattern match expression works step by step. I... (8 Replies)
I have a file that I'm trying to find all the cases of phone number extensions and deleting them. So input file looks like:
abc
x93825
def
13234
x52673
hello
output looks like:
abc
def
13234
hello
Basically delete lines that have 5 numbers following "x". I tried: x\(4) but it... (7 Replies)
I am new to shell scripts.Can u please help me on this req.
test_user = "Arun"
if
echo "test_user is a word"
else
echo "test_user is not a word" (1 Reply)
I need to pick a part of string lets stay started with specific character and end with specific character to replace using sed command
the line is like this:my audio book 71-skhdfon1dufgjhgf8.wav'
I want to move the characters beginning with - end before.
I have different files with random... (2 Replies)
Discussion started by: XP_2600
2 Replies
LEARN ABOUT DEBIAN
dnstracer
DNSTRACER(8) General Commands Manual DNSTRACER(8)NAME
dnstracer - trace a chain of DNS servers to the source
SYNOPSIS
dnstracer [options] name
DESCRIPTION
dnstracer determines where a given Domain Name Server (DNS) gets its information from, and follows the chain of DNS servers back to the
servers which know the data.
Options are:
-c Disable local caching.
-C Enable negative caching.
-o Enable overview of received answers at the end.
-q queryclass
Change the query-class, default is A. You can either specify a number of the type (if you're brave) or one of the following
strings: a, aaaa, a6, soa, cname, hinfo, mx, ns, txt and ptr.
-r retries
Number of retries for DNS requests, default 3.
-s server
DNS server to use for the initial request, default is acquired from the system. If a dot is specified (.), A.ROOT-SERVERS.NET will
be used.
-v Be verbose on what sent or received.
-4 Use only IPv4 servers, don't query IPv6 servers (only available when IPv6 support hasn't been disabled)
-S sourceaddress
Use this as source-address for the outgoing packets.
HOW IT WORKS
It sends the specified name-server a non-recursive request for the name.
Non-recursive means: if the name-server knows it, it will return the data requested. If the name-server doesn't know it, it will return
pointers to name-servers that are authoritive for the domain part in the name or it will return the addresses of the root name-servers.
If the name server does returns an authoritative answer for the name, the next server is queried. If it returns an non-authoritative answer
for the name, the name servers in the authority records will be queried.
The program stops if all name-servers are queried.
Make sure the server you're querying doesn't do forwarding towards other servers, as dnstracer is not able to detect this for you.
It detects so called lame servers, which are name-servers which has been told to have information about a certain domain, but don't have
this information.
EXAMPLES
Search for the A record of www.mavetju.org on your local nameserver:
dnstracer www.mavetju.org
Search for the MX record of mavetju.org on the root-nameservers:
dnstracer "-s" . "-q" mx mavetju.org
Search for the PTR record (hostname) of 212.204.230.141:
dnstracer "-q" ptr 141.230.204.212.in-addr.arpa
And for IPv6 addresses:
dnstracer "-q" ptr "-s" . "-o" 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.4.0.2.0.0.0.0.8.b.0.e.f.f.3.ip6.int
SEE ALSO ntptrace(8), traceroute(8), dig(1)AUTHOR
Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org)
See http://www.mavetju.org/contacts.php for mailing-lists.
February 10, 2008 February 10, 2008 DNSTRACER(8)