×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Optivity Tip -- When change is good... [Optivity NMS - Unix]

Optivity Tip -- When change is good... [Optivity NMS - Unix]

Optivity Tip -- When change is good... [Optivity NMS - Unix]

(OP)
There's an easy way to make global changes to your database in Optivity... (you may have guessed from the last tip).

Modify the plain text backup.

For instance, instead of retopoligizing or making laborous individual changes to each device in a large network after making a network-wide community name change, you can simply edit the string in the backup file and restore it.

Change done.

Bonus tip:

But I only have vi as an editor... Woe is me.

You can still make global changes with vi as well. Take the previous example, we've changed all our read community strings from "public" to "twit". The syntax in vi for the global change would be:

:g/public/s/public/twit/g :g/<string to search for>/<action>
actions ==> s/<what to replace>/<replacement string>/g
(Substitute)
(the "g" means change all ocurrences)
d (Delete the line)

RE: Optivity Tip -- When change is good... [Optivity NMS - Unix]

(OP)
Lost a bit in the formatting... Here's another try!


:g/public/s/public/twit/g __<====Example

:g/<string to search for>/<action> __<===Syntax
__________________________actions ==> s/<what to replace>/<replacement string>/g
________________________________________(Substitute)
________________________________________(the "g" means change all ocurrences)
________________________________________d (Delete the line)

RE: Optivity Tip -- When change is good... [Optivity NMS - Unix]

(OP)
Example of global delete [delete all lines with string]:

:g/<string to search for>/d

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close