hello everybody,
as explained in the title, here is what I want:
str1="name1 name2 name3"
str2="name1"
str3="name"
I know that match(str1,str2) will return 1, but I want that match(str1,str3) returns 0 (when it also returns 1...)
Is there a way to get that exact matching process done... (6 Replies)
I'm trying to find a exact word match but couldn't do it.
ABC
ABC_NE
Searching for ABC_NE tried
grep -w </ABC_NE/>
grep "^ABC_NE$"
but didn't worked , any awk variants would also help.
---------- Post updated at 08:40 AM ---------- Previous update was at 06:48 AM ----------
I... (2 Replies)
I am trying to match a pattern exactly in a shell script. I have tried two methods
awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath
perl -ne '/\bmpath${CURR_MP}\b/ and print' /var/tmp/multipath
Both these methods require that I use the escape character. I am guessing that is why... (8 Replies)
Hi,
I have a file like follows
.
.
.
White.Jack.is.going.home
Black.Jack.is.going.home
Red.Jack.is.going.home
Jack.is.going.home
.
.
.
when I make:
cat <file> | grep -w "Jack.is.going.home"
it gives:
White.Jack.is.going.home
Black.Jack.is.going.home
Red.Jack.is.going.home... (4 Replies)
Hi friends,
i am using the following grep command for exact word match:
>echo "sachin#tendulkar" | grep -iw "sachin"
output: sachin#tendulkar
as we can see in the above example that its throwinng the exact match(which is not the case as the keyword is sachin and string is... (6 Replies)
I want to match exact string stored in Variable INO and print next two lines. I have written below code which partially matches:
awk '/\'$VAR'/{getline; getline; print}'
Will be thankful , if somebody can help in to resolve this problem.
Please view this code tag video for how to use... (9 Replies)
I have a file with the contents below "lets say the name of the file is abcxyz" shown at the end of this.
I am using nawk to find the exact ip address and the 6 lines after the match is found using the following nawk statement
/usr/bin/nawk "/111.46.14.107/,printed==6 { ++printed; print; }"... (7 Replies)
I just want to match "binutils1_test" only, and print the match line only
lyang001@lyang001-OptiPlex-9010:/tmp$ cat file
zbinutils1_test
bbinutils1_test
binutils1_test
w-binutils1_test
lyang001@lyang001-OptiPlex-9010:/tmp$ cat file |grep -w 'binutils1_test'
... (7 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
avahi-dnsconfd.action(8) System Manager's Manual avahi-dnsconfd.action(8)NAME
avahi-dnsconfd.action - avahi-dnsconfd action script
SYNOPSIS
/home/lennart/tmp/avahi/etc/avahi/avahi-dnsconfd.action
DESCRIPTION
avahi-dnsconfd.action is the action script that is called whenever a new unicast DNS server is found or removed by avahi-dnsconfd. The
default script as shipped with avahi patches /etc/resolv.conf to reflect the changed unicast DNS server configuration.
PARAMETERS
argv[1] Contains the character "+" if the DNS server is new, "-" when it shall be removed from the DNS server list.
argv[2] The IP address of the DNS server.
argv[3] Numerical network interface number this DNS server was found on.
argv[4] Numerical protocol number this DNS server was found on. (usually 2 for IPv4 and 10 for IPv6)
ENVIRONMENT
AVAHI_INTERFACE Contains the textual interface name the corresponds with argv[3]. (e.g. "eth0")
AVAHI_INTERFACE_DNS_SERVERS Contains a list of all DNS servers that avahi-dnsconfd found on the interface $AVAHI_INTERFACE, separated by
spaces.
AVAHI_DNS_SERVERS Contains a list of all DNS server that avahi-dnsconfd found on all interfaces, separated by spaces.
AUTHORS
The Avahi Developers <avahi (at) lists (dot) freedesktop (dot) org>; Avahi is available from http://avahi.org/
SEE ALSO avahi-dnsconfd(8), avahi-daemon(8)COMMENTS
This man page was written using xml2man(1) by Oliver Kurth.
Manuals User avahi-dnsconfd.action(8)