Search Results

Search: Posts Made By: raosr020
1,303
Posted By Don Cragun
Is this minor modification of the script supplied...
Is this minor modification of the script supplied for your last thread sufficient?:
awk '
NF == 0 { next }
/^TT/ { if(!((key = $1 FS $2) in out))
out[key] = $0
TTf = 1
next
}
TTf...
992
Posted By bakunin
Is your input always guaranteed to consist of...
Is your input always guaranteed to consist of groups of 2 lines, one starting with "TT:" and the other with a "<tell..."clause?

If so, create a sort-of table with the 2-line groups brought to one...
992
Posted By Don Cragun
This is also pretty easy with awk: awk ' NF...
This is also pretty easy with awk:
awk '
NF == 0 { next }
/^TT/ { if(!((key = $1 FS $2) in out))
out[key] = $0
next
}
{ out[key] = out[key] "\n" $0 }
END { for(key in out)...
4,018
Posted By MadeInGermany
I don't know why it happens, but your first...
I don't know why it happens,
but your first line seems to be wrong anyway.
It is
search mydomain otherdomain...
And can be omitted if there is no otherdomain and mydomain is specified elsewhere.
4,018
Posted By naren nandale
Try in this way... #vi /etc/resolv.conf ...
Try in this way...

#vi /etc/resolv.conf
search india.com
nameserver 192.168.0.1

Restart the service : -
#service named restart

Enable the service permanently : -
#chkconfig named...
4,018
Posted By MadeInGermany
A change in resolve.conf (DNS client) is...
A change in resolve.conf (DNS client) is immediately active - no need to restart network.
And no need to start or restart a named (DNS service)!
1,653
Posted By Yoda
awk...
awk '/^for/{print;f=1;next;}/^do/{print;f=0;next;}f!=1{print}' filename
1,578
Posted By Scrutinizer
What isn't working? I get: Sun is Hot Moon...
What isn't working? I get:

Sun is Hot
Moon is cool
;

revoke connect from SREE;
delete from = 'SREE';
grant connect to SREE with 'fastcar8';

-- Mon Sep 12 08:54:10 CDT 2011
revoke...
1,578
Posted By Scrutinizer
awk 'END{if(p)printf "%s",p} /^--/{p=p $0 RS;...
awk 'END{if(p)printf "%s",p} /^--/{p=p $0 RS; next} /revoke connect from SREE/{p=x} p{$0=p $0; p=x}1' infile
2,862
Posted By Scrutinizer
Just for fun: $ cat infile abc 123 ; ...
Just for fun:
$ cat infile
abc
123
;
rao
bell
;
call
abc
123
;
rao
bell
;


Output:
$ sed '1h;1!H;$!d;$g;s/\(.*\)\(.*\)\n\1/\1\2/' infile
abc
1,578
Posted By Scrutinizer
Hi, you are welcome. What is wrong with...
Hi, you are welcome. What is wrong with redirecting to a new file? You can rename it to the old file afterwards when satisfied with the result. It is the safest way..
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy