[j-nsp] "replace pattern" Command & White Spaces

Mark Tinka mark.tinka at seacom.mu
Sat Jul 30 13:02:39 EDT 2016



On 30/Jul/16 10:13, Saku Ytti wrote:

> Hey,
>
> I always just do:
> start shell
> zcat /config/juniper.conf.gz|sed 'magic' > new.conf
> exit
> configure exclusive
> load override new.conf
> commit and-quit

I considered using "sed" via the FreeBSD CLI, but trying to avoid
getting into the guts of the system.

>
>
> My main problem with 'replace' is, that it only considers 'user data',
> it has no visibility on syntax, so you can't change ambiguous user
> data, because you cannot add syntax to the match+replace.
> Instead of trying to workaround with the implementation and what ever
> corner cases I'm not yet aware of, I use generic tools I already know
> how to use.

Not sure if I understand you - are you saying "replace" does not support
Junos commands, and only works on user configurations?

Mark.


More information about the juniper-nsp mailing list