Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Vi - insert a tab between words? Post 302742833 by Yoda on Tuesday 11th of December 2012 03:57:06 PM
Old 12-11-2012
Run below in VI command mode:-
Code:
:%s/Jones /Jones[tab]/g

Note: press key: Tab (highlighted) after string: Jones for replacement.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert TAB in echo statement

Hi, Can some1 help me to output a tab in an echo statement. I have tried echo "RNC: \t NODEB" but dont get the correct output. I am a beginnger to unix, so pls hold back the laughs....if u can (5 Replies)
Discussion started by: sunils27
5 Replies

2. Shell Programming and Scripting

pls help me to insert tab and formatthe file

i want to format the file with tab delimitaed and assign heading to each column . my format of file is 7 aiss 10 8 linux 25 9 linux_10for 35 Ouput i want like this Ver Host Fails 7 aiss 10 8 linux 25 9 ... (5 Replies)
Discussion started by: getdpg
5 Replies

3. UNIX for Dummies Questions & Answers

How to insert tab at specified column.HELP

I have input like: 1234567890 cut -c1-3,6-7,9-10 input > output Now I got 1236790. I want to insert space between each cut. So the output like: 123 67 90 Can anybody help? Thanks. (7 Replies)
Discussion started by: sslr
7 Replies

4. Shell Programming and Scripting

sed: how to insert tab?

Hi, I'm using the following to insert lines into file: sed ${rowNr}i'\ first row\ second row\ third row\ ' file.txt How can I add tab in front of each added line? "\t" or actual TAB does not seem to work? Thanks! (2 Replies)
Discussion started by: Juha
2 Replies

5. Shell Programming and Scripting

insert a field into a tab delimited file

Hello, Can someone help me to do this with awk or sed? I have a file with multiple lines, each line has many fields separated with a tab. I would like to add one more field holding 'na' in between the first and second fields. old file looks like, 1, field1 field2 field3 ... 2, field1... (7 Replies)
Discussion started by: ssshen
7 Replies

6. UNIX for Dummies Questions & Answers

Insert Field into a tab-delimited file

Hello, I have about 100 files in a directory with fields which are tab delimited. I would like to append the file name as the first field and it has to be done as many times as the total lines in the file. For example, myFile1.txt has the following data: 1 x y z 2 a b ... (5 Replies)
Discussion started by: Gussifinknottle
5 Replies

7. Shell Programming and Scripting

insert LF and TAB for formatting

trying to insert a LF and 2 TABs for this: sed 's/<td><\/td>/<td>\n\t\t<\/td>/' infile. but, I'm not getting the syntax for inserting the LF and TABs correct (1 Reply)
Discussion started by: dba_frog
1 Replies

8. UNIX for Dummies Questions & Answers

insert whitespace (tab) at start of each line

Hi all, I have this: begin data; dimensions nind=168 nloci=6; info BDT001.4 ( 1 , 1 ) ( 1 , 12 ) BDT003.4 ( 1 , 1 ) ( 12 , 12 ) BDT007.4 ( 1 , 1 ) ( 12 , 12 ) BDT009.4 ( 1 , 32 ) ( 12 , 22 ) etc, etc And need this: begin data; dimensions nind=168 nloci=6; info ... (2 Replies)
Discussion started by: MDeBiasse
2 Replies

9. Shell Programming and Scripting

Problem while assign string (words with tab) to a variable

Hi, I have a String(words with tab space) in a file ->file1.txt 0xxxx 11 test $aa$ 8.43 when i read the file and assign to variable value=$(cat file1.txt) echo $value i get the output without tab spaces. 0xxxx 11 test $aa$ 8.43 How to assign string... (2 Replies)
Discussion started by: nanthagopal
2 Replies

10. Shell Programming and Scripting

Delete and insert columns in a tab delimited file

Hi all , I have a file having 12 columns tab delimited . I need to read this file and remove the column 3 and column 4 and insert a word in column 3 as "AVIALABLE " Is there a way to do this . I am trying like below Thanks DJ cat $FILENAME|awk -F"\t" '{ print $1 "\t... (3 Replies)
Discussion started by: Hypesslearner
3 Replies
LDAP_MODIFY_BATCH(3)							 1						      LDAP_MODIFY_BATCH(3)

ldap_modify_batch - Batch and execute modifications on an LDAP entry

SYNOPSIS
bool ldap_modify_batch (resource $link_identifier, string $dn, array $entry) DESCRIPTION
Modifies an existing entry in the LDAP directory. Allows detailed specification of the modifications to perform. PARAMETERS
o $link_identifier - An LDAP link identifier, returned by ldap_connect(3). o $dn - The distinguished name of an LDAP entity. o $entry - An array that specifies the modifications to make. Each entry in this array is an associative array with two or three keys: attrib maps to the name of the attribute to modify, modtype maps to the type of modification to perform, and (depending on the type of modification) values maps to an array of attribute values relevant to the modification. Possible values for modtype include: o LDAP_MODIFY_BATCH_ADD - Each value specified through values is added (as an additional value) to the attribute named by attrib. o LDAP_MODIFY_BATCH_REMOVE - Each value specified through values is removed from the attribute named by attrib. Any value of the attribute not contained in the values array will remain untouched. o LDAP_MODIFY_BATCH_REMOVE_ALL - All values are removed from the attribute named by attrib. A values entry must not be pro- vided. o LDAP_MODIFY_BATCH_REPLACE - All current values of the attribute named by attrib are replaced with the values specified through values. Note that any value for attrib must be a string, any value for values must be an array of strings, and any value for modtype must be one of the LDAP_MODIFY_BATCH_* constants listed above. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Add a telephone number to a contact <?php $dn = "cn=John Smith,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "telephoneNumber", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => ["+1 555 555 1717"], ], ]; ldap_modify_batch($connection, $dn, $modifs); ?> Example #2 Rename a user <?php $dn = "cn=John Smith,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "sn", "modtype" => LDAP_MODIFY_BATCH_REPLACE, "values" => ["Smith-Jones"], ], [ "attrib" => "givenName", "modtype" => LDAP_MODIFY_BATCH_REPLACE, "values" => ["Jack"], ], ]; ldap_modify_batch($connection, $dn, $modifs); ldap_rename($connection, $dn, "cn=Jack Smith-Jones", NULL, TRUE); ?> Example #3 Add two e-mail addresses to a user <?php $dn = "cn=Jack Smith-Jones,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "mail", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => [ "jack.smith@example.com", "jack.smith-jones@example.com", ], ], ]; ldap_modify_batch($connection, $dn, $modifs); ?> Example #4 Change a user's password <?php $dn = "cn=Jack Smith-Jones,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "userPassword", "modtype" => LDAP_MODIFY_BATCH_REMOVE, "values" => ["Tr0ub4dor&3"], ], [ "attrib" => "userPassword", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => ["correct horse battery staple"], ], ]; ldap_modify_batch($connection, $dn, $modifs); ?> Example #5 Change a user's password (Active Directory) <?php function adifyPw($pw) { return iconv("UTF-8", "UTF-16LE", '"' . $pw . '"'); } $dn = "cn=Jack Smith-Jones,ou=Wizards,dc=ad,dc=example,dc=com"; $modifs = [ [ "attrib" => "unicodePwd", "modtype" => LDAP_MODIFY_BATCH_REMOVE, "values" => [adifyPw("Tr0ub4dor&3")], ], [ "attrib" => "unicodePwd", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => [adifyPw("correct horse battery staple")], ], ]; ldap_modify_batch($connection, $dn, $modifs); PHP Documentation Group LDAP_MODIFY_BATCH(3)
All times are GMT -4. The time now is 09:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy