Sponsored Content
Top Forums Shell Programming and Scripting Creating a sed script to change ip addresses in a file Post 302600942 by Scott on Wednesday 22nd of February 2012 12:42:49 PM
Old 02-22-2012
It will likely print ? if nothing is substituted (i.e. if the string to replace doesn't exist, or you run it for a second time).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

creating virtual ip addresses

i am running solaris 9 i now how to create virtual ip address but how do i keep them so when the server reboots they are still there?...THANX (2 Replies)
Discussion started by: rmuhammad
2 Replies

2. UNIX for Dummies Questions & Answers

How do I change IP addresses in command mode...

How do I change IP addresses in command mode? i need to assign custom (non DHCP) addresses from the command line. Actually I also need to know how to change the subnet mask, the gateway and the primary, secondary, ... dns servers. (6 Replies)
Discussion started by: Super.Anyak
6 Replies

3. Shell Programming and Scripting

How to change this file with SED?

I have a file like below: I want to delete the rows which begining with "BC" "CD" and "TY" . then change every fields into one row like this at last delete the head words : USing awk to change it is not hard. I want to know how to do this work using SED ? Thank you! ... (4 Replies)
Discussion started by: bejgirl
4 Replies

4. IP Networking

Ip Addresses With Hardware Change

I have 2 identical printers with the same IP on my network. One is only used as a backup for the primary printer and both are never on line at the same time. The goal was to always keep only 1 on and have an use the other printer as an immediate backup if necessary. But when I switch the cable I... (4 Replies)
Discussion started by: golfs4us
4 Replies

5. Shell Programming and Scripting

script to get all ip addresses of servers into a file

Hi all i need to create a script that pings every server in my range (0-254) adn then returns the values to a file? can anyone please help. i am working in the tcsh ( and yes i know how to ping ) but i dont know how to ping them all in one script without copying and pasting a 254 times? ... (1 Reply)
Discussion started by: brian112
1 Replies

6. UNIX for Dummies Questions & Answers

sed script to change timecode string

Need some help. I need to run a script to modify a csv file. Here is an example off a few lines from the csv 98M-01.WAV,98M,01,00:00:49,01:07:36:00,"MIX",,"BOOM-MKH50",,,,,,,,,,"", 98L-01.WAV,98L,01,00:00:51,01:01:45:00,"MIX",,"BOOM-MKH50",,,,,,,,,,"", I need a sed script to find all... (4 Replies)
Discussion started by: Vrc2250
4 Replies

7. UNIX for Advanced & Expert Users

Change user while creating spool file

Hi, I have a script which generate a HTML file from a unix user. Script spool the data extracted from DB using sqlplus. Problem is html file which gets generated is automatically assigned/owned with oracle user so my unix user just having read only permission to that HTML file. So I want... (1 Reply)
Discussion started by: sv0081493
1 Replies

8. UNIX for Beginners Questions & Answers

File name change with sed

I have a bunch of text files like this: Sample_S1_L001_R1.txt Sample_S10_L001_R1.txt Sample_S11_L001_R1.txt I am using the following script to add a 0 to those files with a single digit after the S: ls *.txt | sed 's/\(.*_S\)\(_.*\)/mv & \10\2/' | sh And then the following script to... (4 Replies)
Discussion started by: Xterra
4 Replies

9. UNIX for Beginners Questions & Answers

Using sed to change file into an awk script

Hi I want to use sed to change a text files input into an awk script. For example if the input says " chord -- english " I want to change this using sed 's/pattern 1 /pattern 2 /'g filename but I don't understand how to use part of the pattern 1 to input that into pattern 2 . Like after... (10 Replies)
Discussion started by: enforcer
10 Replies

10. UNIX for Beginners Questions & Answers

awk or sed script to count number of occurrences and creating an average

Hi Friends , I am having one problem as stated file . Having an input CSV file as shown in the code U_TOP_LOGIC/U_HPB2/U_HBRIDGE2/i_core/i_paddr_reg_2_/Q,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,0... (4 Replies)
Discussion started by: kshitij
4 Replies
ipa-ldap-updater(1)						 IPA Manual Pages					       ipa-ldap-updater(1)

NAME
ipa-ldap-updater - Update the IPA LDAP configuration SYNOPSIS
ipa-ldap-updater [options] input_file(s) ipa-ldap-updater [options] DESCRIPTION
ipa-ldap-updater is used to apply updates to the IPA LDAP server when the IPA packages are being updated. It is not intended to be executed by end-users. When run with no file arguments, ipa-ldap-updater will process all files with the extension .update in /usr/share/ipa/updates. An update file describes an LDAP entry and a set of operations to be performed on that entry. It can be used to add new entries or modify existing entries. Blank lines and lines beginning with # are ignored. There are 7 keywords: * default: the starting value * add: add a value (or values) to an attribute * remove: remove a value (or values) from an attribute * only: set an attribute to this * onlyifexist: set an attribute to this only if the entry exists * deleteentry: remove the entry * replace: replace an existing value, format is old: new * addifnew: add a new attribute and value only if the attribute doesn't already exist. Only works with single-value attributes. * addifexist: add a new attribute and value only if the entry exists. This is used to update optional entries. Values is a comma-separated field so multi-values may be added at one time. Double or single quotes may be put around individual values that contain embedded commas. The difference between the default and add keywords is if the DN of the entry exists then default is ignored. So for updating something like schema, which will be under cn=schema, you must always use add (because cn=schema is guaranteed to exist). It will not re-add the same information again and again. It alsos provide some things that can be templated such as architecture (for plugin paths), realm and domain name. The available template variables are: * $REALM - the kerberos realm (EXAMPLE.COM) * $FQDN - the fully-qualified domain name of the IPA server being updated (ipa.example.com) * $DOMAIN - the domain name (example.com) * $SUFFIX - the IPA LDAP suffix (dc=example,dc=com) * $ESCAPED_SUFFIX - the ldap-escaped IPA LDAP suffix * $LIBARCH - set to 64 on x86_64 systems to be used for plugin paths * $TIME - an integer representation of current time A few rules: 1. Only one rule per line 2. Each line stands alone (e.g. an only followed by an only results in the last only being used) 3. adding a value that exists is ok. The request is ignored, duplicate values are not added 4. removing a value that doesn't exist is ok. It is simply ignored. 5. If a DN doesn't exist it is created from the 'default' entry and all updates are applied 6. If a DN does exist the default values are skipped 7. Only the first rule on a line is respected Adds and updates are applied from shortest to longest length of DN. Deletes are done from longest to shortest. OPTIONS
-d, --debug Enable debug logging when more verbose output is needed -t, --test Run through the update without changing anything. If changes are available then the command returns 2. If no updates are available it returns 0. -y File containing the Directory Manager password -l, --ldapi Connect to the LDAP server using the ldapi socket -p, ---plugins Execute update plugins as well as any update files. There is no way to execute only the plugins. -u, ---upgrade Upgrade an installed server in offline mode (implies --ldapi and --plugins) -W, ---password Prompt for the Directory Manager password EXIT STATUS
0 if the command was successful 1 if an error occurred 2 if run with in test mode (-t) and updates are available IPA
Sep 12 2008 ipa-ldap-updater(1)
All times are GMT -4. The time now is 03:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy