Sponsored Content
Top Forums UNIX for Dummies Questions & Answers vi Search for text, Replace with <CR> or control character. Post 302318063 by omega949 on Wednesday 20th of May 2009 04:29:34 PM
Old 05-20-2009
Found the fix (aka: solution)

Thanks (again) to Padow, a slight change to his syntax solved the problem. Here is the syntax that worked:

:1,$s/ -I/\r/g

Note that I included a space in the seach-for text " -I". This allowed for the extra space to be removed so each line starts at the beginning.

Cheers!

Omega949
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

2. UNIX for Dummies Questions & Answers

search and replace a specific text in text file?

I have a text file with following content (3 lines) filename : output.txt first line:12/12/2008 second line:12/12/2008 third line:Y I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before. I tried using cat output.txt... (4 Replies)
Discussion started by: santosham
4 Replies

3. Shell Programming and Scripting

Need to search and replace based on character count

Hi, I wanted to add a newline character after every 100 characters in a file using a awk or shell without reading each line of the file. I want to run a command on the complete file. This does based on a string but i want to add a new line after every 100 characters ir-respective of the... (3 Replies)
Discussion started by: vijaykrc
3 Replies

4. Shell Programming and Scripting

Replace any control character in the string

Need to replace any control character in the string in perl ---------- Post updated at 04:22 PM ---------- Previous update was at 03:50 PM ---------- Any help !!! Thanks in advance (2 Replies)
Discussion started by: hansini
2 Replies

5. Shell Programming and Scripting

Search and replace text

Hello, I am trying to search and replace but I don't know how to do it. My simple knowlegde in search and replace using sed is not helping me at all. File: its a cause value #22: dfg ggg Cause value #1: aasfa fasdf asfa value #22: affg gggg Basically i want to replace the... (6 Replies)
Discussion started by: balan1983a
6 Replies

6. Shell Programming and Scripting

Regex:search/replace but not for escaped character

Hi Input: - -- --- ---- aa-bb-cc aa--bb--cc aa---bb---cc aa----bb----cc Output: . - -. -- aa.bb.cc (7 Replies)
Discussion started by: chitech
7 Replies

7. Shell Programming and Scripting

Replace Control M (^M) character with new line

Hi All, We are getting an external file in abc.csv format. When opened in excel spread sheet, it is opening alright. But when opened in notepad, I see the contents in a single line. Ftp'd the file in binary mode to AIX UNIX host. When opened, I see Control M (^M) characters in place of New Line... (16 Replies)
Discussion started by: njny
16 Replies

8. UNIX for Dummies Questions & Answers

Search for a particular word and replace the first character

Hi Unix gurus, I've a dna sequence in a file format known as fasta format (sequence header starts with > and ignored), an example shown below: >sequence_1 CGTATTCTCCGAATACC ATACG >sequence_2 CAGATTTTCAAATACCCCC In a file like this I want to do the following three search and replace. The... (4 Replies)
Discussion started by: Fahmida
4 Replies

9. Shell Programming and Scripting

Search a character and replace it with multiple lines

This is for AIX 6.1, I've a flat file and the format is like this DECLARE some statements; BEGIN some statements; END; I've to search BEGIN and replace it with the following 4 lines BEGIN For x in 1..1 LOOP BEGIN Similarly I've to search END and replace it with the... (7 Replies)
Discussion started by: Mukul Sharma
7 Replies

10. Post Here to Contact Site Administrators and Moderators

Search for a pattern and replace a space at specific position with a Character in File

In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123. So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies
ib(7D)								      Devices								    ib(7D)

NAME
ib - InfiniBand Bus Nexus Driver DESCRIPTION
The ib (IB nexus) driver is a pseudo nexus driver that supports enumeration of port devices, VPPA (Virtual Physical Point Attachment), HCA_SVC (HCA Service) devices, and I/O controllers (IOC) on the InfiniBand fabric that are visible to the host and provides interfaces to cfgadm_ib(1M) to manage hot-plugging of IB devices. The ib nexus driver enumerates the port device, VPPA devices and HCA_SVC devices based on entries specified in the ib.conf file. IOC devices are enumerated on demand. The IB nexus driver uses InfiniBand Device Manager ser- vices (ibdm(7D)) to enumerate port devices, VPPA devices, HCA_SVC devices, and IOCs on the IB fabric. CONFIGURATION
You configure the ib driver by defining properties in the ib.conf file. The IB nexus driver supports the following properties: +--------------+---------+---------------------------------------------------------+ |PROPERTY NAME | DEFAULT | POSSIBLE VALUES | +--------------+---------+---------------------------------------------------------+ |port-svc-list | "" | List of service names, for example: srv | +--------------+---------+---------------------------------------------------------+ |vppa-svc-list | "" | List of service names, for example: ipib | +--------------+---------+---------------------------------------------------------+ |hca-svc-list | "" | List of service names, for example: hca_nfs | +--------------+---------+---------------------------------------------------------+ The port-svc-list property defines the list of port communication service names per port. The IB nexus driver creates a device instance for each entry in this property per Host Channel Adapter (HCA) port. The ib.conf file contains a port-svc-list="" entry by default. You update port-svc-list with service names you want to add to the system. The vppa-svc-list property defines the list of VPPA communication service names per port per partition key. The IB nexus driver creates a device instance for each entry in this property per Host Channel Adapter (HCA) port. The ib.conf file contains a vppa-svc-list="" entry by default. You update vppa-svc-list with service names you want to add to the system. The hca-svc-list property defines the list of HCA_SVC communication service names per HCA. The IB nexus driver creates a device instance for each entry in this property per Host Channel Adapter (HCA). The ib.conf file contains a hca-svc-list="" entry by default. You update hca-svc-list with service names you want to add to the system. The service name specified in port-svc-list, vppa-svc-list and hca-svc-list must be unique, be a maximum of four characters long, and is limited to digits 0-9 and letters a-z and A-Z. IOC drivers (which are parented by the IB nexus driver) may themselves have .conf files. To distinguish those cases from pseudo drivers parented by IB nexus, such drivers should include the "ib-node-type" property with value merge in the IOC driver.conf file. That property ensures that properties from the .conf file are merged with other properties found through hardware probing. EXAMPLES
Example 1: A sample ib.conf file with one service name entry for PORT communication services. # # Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # port-svc-list="" vppa-svc-list=""; hca-svc-list=""; In Example 1, the IB nexus driver does not create any port/vppa/hca_svc device instances. Example 2: A sample ib.conf file with one entry for "srv" service: port-svc-list="srv" vppa-svc-list=""; hca-svc-list=""; The IB nexus driver creates one srv service instance for every HCA port that exists on the host. For example, if there are two HCAs, each with two ports on the host, the IB nexus driver creates four instances of the srv service. Example 3: A sample ib.conf file with one service name entry for each of Port and VPPA communication services: port-svc-list="srv" vppa-svc-list="ipib"; hca-svc-list=""; If there are two HCAs in the system with two ports each and each port has two valid PKEY values, the IB nexus driver creates four instances of srv service (one for each port). It also creates eight instances of ipd service (one per each port/PKEY combination). Example 4: A sample ib.conf file with one service name entry for each of Port, VPPA and HCA_SVC communication services: port-svc-list="srv"; vppa-svc-list="ipib"; hca-svc-list="hca_nfs"; The IB nexus driver creates one instance of hca_nfs service for each HCA in the system. Example 5: IOC driver .conf ib-node-type="merge"; enable-special-mode="on"; FILES
/kernel/drv/ib 32-bit x86 ELF kernel module /kernel/drv/amd64/ib 64-bit x86 ELF kernel module /kernel/drv/sparcv9/ib 64-bit SPARC ELF kernel module /kernel/drv/ib.conf driver configuration file ATTRIBUTES
See attributes(5) for a description of the following attribute: +-----------------------------+-----------------------------+ |ATTRIBUTE TYPE |ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |SPARC, x86 | +-----------------------------+-----------------------------+ |Availability |SUNWhea, SUNWib | +-----------------------------+-----------------------------+ |Interface Stability |Consolidation Private | +-----------------------------+-----------------------------+ SEE ALSO
cfgadm_ib(1M), driver.conf(4), ib(4), attributes(5), ibcm(7D), ibdm(7D), ibtl(7D) Writing Device Drivers InfiniBand Architecture Specification, Volume 1: Release 1.1 System Administration Guide: Basic Administration DIAGNOSTICS
In addition to being logged, the following messages may appear on the system console. All messages are formatted in the following manner: ib: WARNING: Error message... unit-address property in %s.conf not well-formed. The driver.conf file does not have a valid "unit-addr" property defined. This property is an array of strings. cannot find unit-address in %s.conf. The driver.conf file does not have a valid "unit-addr" property defined. This property is an array of strings. Waiting for Port %d initialization. Waiting for port initialization from subnet manager. SunOS 5.11 26 Jan 2009 ib(7D)
All times are GMT -4. The time now is 11:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy