Sponsored Content
Top Forums Shell Programming and Scripting Need help in correcting sed script Post 302888454 by temp.sha on Friday 14th of February 2014 10:11:34 AM
Old 02-14-2014
Hi,

Thanks for helping me. But unfortunately your sed command is replacing "aaa" on other places also. see in red colors. I want to change "aaa" string only between "auto-config-policy test"
and "auto-upgrade-policy test2" . That to between deny/accept/hold and "precedence" (see in orange color) nowhere else.

<<<< text >>>>>
Code:
auto-config-policy test
      deny aaa precedence 4 profile aaa any 
      deny aaa precedence 6 domain aaa
      accept aaa precedence 4 profile aaa any
      hold aaa precedence 4 profile aaa any

auto-upgrade-policy test2
      upgrade aaa precedence 4 profile default-aaa any 
      upgrade aaa precedence 6 domain default vlan 345 
      upgrade aaa precedence 4 profile default-aaa any

upgrade-profile aaa default-aaa
      autoupgrade configuration
      autoupgrade firmware

aaa  00:11:AA-DD-CC-AA
        use upgrade default-aaa
        use config   defautl-aaa

<<<<<text>>>>


Thanks.............

Last edited by Scrutinizer; 02-14-2014 at 04:43 PM.. Reason: code tags also for data
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Correcting script

Hi! I have for example a script/file: +1 echo "toto" +2 echo "abcdef +3 echo "dqmsl" $r "dsqlfj" +4 cat titi | tr \t' ';' +5 exit --------------------------------------- I try to find a solution who say: <ERROR> The character " has been forgotten a the line 2 The character... (7 Replies)
Discussion started by: Castelior
7 Replies

2. Solaris

Correcting system time

I've installed Solaris 8, but didn't quite give it the correct (machine) time. Think the machine is out of sync. Can I change that afterwards or do I have to do another install right from the beginning? (1 Reply)
Discussion started by: kuultak
1 Replies

3. Shell Programming and Scripting

sed script

how to convert the follow sed script file into a command line ? example: /^\.TS/,/^\.TE/{ /^$/p } I have tried the below but it is not working: # sed -n "/^\.TS/,/^\.TE/{/^$/p}" file file: 111 .TS 222 $333 << extract this line 444 .TE 555 (2 Replies)
Discussion started by: 3Gmobile
2 Replies

4. UNIX for Dummies Questions & Answers

Correcting the time on FreeBSD

Possibly this is not even a FreeBSD issue, but a BIOS issue. Upon installation of FreeBSD, the time is set using the standard feature of selecting a time zone. Some installations are correctly set to the current time, but others are either one or two hours off. So the time is read from the time... (0 Replies)
Discussion started by: figaro
0 Replies

5. AIX

Help me in correcting sendmail.cf

Hi all, In AIX I need to set the below two as of now these are not. 1)Opnoexpn is not set in sendmail.cf 2)Opnovrfy is not set in sendmail.cf Please let me know the steps to set Opnoexpn and Opnovrfy in sendmail.cf Thanks and Regards, Pavankumar (0 Replies)
Discussion started by: pavankumar432
0 Replies

6. UNIX Desktop Questions & Answers

Correcting the display resolution

I have an issue with the display resolution under Xfce. The monitor can handle 1024x768, but the screen display is 800x600. The control panel does not allow me to change this. I also found the file .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml in which I have made changes, but after a... (0 Replies)
Discussion started by: figaro
0 Replies

7. Shell Programming and Scripting

need help in correcting the code

Hi Guys ! can anyone help me to write the code doing same thing without using awk. is it possible using cut command? awk '{c++} END {for(k in c} print k "\t\t" c;}' file_name | sort -nrk 2 | column -t thanks in advance BR Ewa (4 Replies)
Discussion started by: me_newbie
4 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Help correcting file with differing number of fields

Hi all, I have a tab separated file, and one of the fields is sub-delimited by colon. The problem is there can be zero to 4 colons within this field. When I try to change colons to tabs the result is a file with a differing number of fields. I want to go from: a:b:c:d:e a:b:c a:b:c:d:e a... (4 Replies)
Discussion started by: torchij
4 Replies

9. Shell Programming and Scripting

Correcting awk error

the following code turns back ticks "`" to new lines "\n". Then, it attempts to grab only a certain section of the output and excludes lines that contain particular patterns...i.e. "ZooLine|echo|opencert". awk -vs1="\`" '{gsub(s1,"\n",$0)} 1 {print ; if(/NewLine \(\)/,/}/{if(!/NewLine|echo... (3 Replies)
Discussion started by: SkySmart
3 Replies
DNSSEC-KEYGEN(8)														  DNSSEC-KEYGEN(8)

NAME
dnssec-keygen - DNSSEC key generation tool SYNOPSIS
dnssec-keygen -a algorithm -b keysize -n nametype [ -c class ] [ -e ] [ -g generator ] [ -h ] [ -p protocol ] [ -r randomdev ] [ -s strength ] [ -t type ] [ -v level ] name DESCRIPTION
dnssec-keygen generates keys for DNSSEC (Secure DNS), as defined in RFC 2535. It can also generate keys for use with TSIG (Transaction Sig- natures), as defined in RFC 2845. OPTIONS
-a algorithm Selects the cryptographic algorithm. The value of algorithm must be one of RSAMD5 or RSA, DSA, DH (Diffie Hellman), or HMAC-MD5. These values are case insensitive. Note that for DNSSEC, DSA is a mandatory to implement algorithm, and RSA is recommended. For TSIG, HMAC-MD5 is mandatory. -b keysize Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSA keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC-MD5 keys must be between 1 and 512 bits. -n nametype Specifies the owner type of the key. The value of nametype must either be ZONE (for a DNSSEC zone key), HOST or ENTITY (for a key associated with a host), or USER (for a key associated with a user). These values are case insensitive. -c class Indicates that the DNS record containing the key should have the specified class. If not specified, class IN is used. -e If generating an RSA key, use a large exponent. -g generator If generating a Diffie Hellman key, use this generator. Allowed values are 2 and 5. If no generator is specified, a known prime from RFC 2539 will be used if possible; otherwise the default is 2. -h Prints a short summary of the options and arguments to dnssec-keygen. -p protocol Sets the protocol value for the generated key. The protocol is a number between 0 and 255. The default is 2 (email) for keys of type USER and 3 (DNSSEC) for all other key types. Other possible values for this argument are listed in RFC 2535 and its successors. -r randomdev Specifies the source of randomness. If the operating system does not provide a /dev/random or equivalent device, the default source of randomness is keyboard input. randomdev specifies the name of a character device or file containing random data to be used instead of the default. The special value keyboard indicates that keyboard input should be used. -s strength Specifies the strength value of the key. The strength is a number between 0 and 15, and currently has no defined purpose in DNSSEC. -t type Indicates the use of the key. type must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data. -v level Sets the debugging level. GENERATED KEYS
When dnssec-keygen completes successfully, it prints a string of the form Knnnn.+aaa+iiiii to the standard output. This is an identifica- tion string for the key it has generated. These strings can be used as arguments to dnssec-makekeyset. o nnnn is the key name. o aaa is the numeric representation of the algorithm. o iiiii is the key identifier (or footprint). dnssec-keygen creates two file, with names based on the printed string. Knnnn.+aaa+iiiii.key contains the public key, and Knnnn.+aaa+iiiii.private contains the private key. The .key file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement). The .private file contains algorithm specific fields. For obvious security reasons, this file does not have general read permission. Both .key and .private files are generated for symmetric encryption algorithm such as HMAC-MD5, even though the public and private key are equivalent. EXAMPLE
To generate a 768-bit DSA key for the domain example.com, the following command would be issued: dnssec-keygen -a DSA -b 768 -n ZONE example.com The command would print a string of the form: Kexample.com.+003+26160 In this example, dnssec-keygen creates the files Kexample.com.+003+26160.key and Kexample.com.+003+26160.private SEE ALSO
dnssec-makekeyset(8), dnssec-signkey(8), dnssec-signzone(8), BIND 9 Administrator Reference Manual, RFC 2535, RFC 2845, RFC 2539. AUTHOR
Internet Software Consortium BIND9 June 30, 2000 DNSSEC-KEYGEN(8)
All times are GMT -4. The time now is 05:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy