Sponsored Content
Top Forums Shell Programming and Scripting sed command to replace one value which occurs multiple times Post 302995706 by Preeti Chandra on Tuesday 11th of April 2017 05:07:27 AM
Old 04-11-2017
sed command to replace one value which occurs multiple times

Hi,

My Input File :
Code:
 "MN.1.2.1.2.14.1.1" := 
"MN_13_TM_4" ( 000000110110100100110001111110110110101110101001100111110100011010110111001 )
"MOS.1.2.1.2.13.6.2" := 
 "MOS_13_TM_4" ( 000000110110100100110001111110110110101110101001100111110100011010110111001 )

Like above template,I have multiple entries of MN and MOS.
I want to replace only "MOS_13_TM_4" value in the input file without touching "MN_13_TM_4" value,although both values are same i.e
Code:
000000110110100100110001111110110110101110101001100111110100011010110111001

using following command will replace the value at both places(MN & MOS)
Code:
i.e. sed 's/000000110110100100110001111110110110101110101001100111110100011010110111001/00000011011010010011000111111011011010111010100110011111010001101011011MMMM

How to replace only MOS value?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using sed command to replace multiple lines

the file contains the follwoing lines /* * Copyright (C) 1995-1996 by XXX Corporation. This program * contains proprietary and confidential information. All rights reserved * except as may be permitted by prior written consent. * * $Id: xxx_err.h,v 1.10 2001/07/26 18:48:34 zzzz $ ... (1 Reply)
Discussion started by: radha.kalivar
1 Replies

2. Shell Programming and Scripting

TO find the word which occurs maximum number of times

Hi Folks !!!!!!!!!!!!!!!!!!! My Requirement is............. i have a input file: 501,501.chan 502,502.anand 503,503.biji 504,504.raja 505,505.chan 506,506.anand 507,507.chan and my o/p should be chan->3 i.e. the word which occurs maximum number of times in a file should be... (5 Replies)
Discussion started by: aajan
5 Replies

3. Shell Programming and Scripting

Looking for a single line to count how many times one character occurs in a word...

I've been looking on the internet, and haven't found anything simple enough to use in my code. All I want to do is count how many times "-" occurs in a string of characters (as a package name). It seems it should be very simple, and shouldn't require more than one line to accomplish. And this is... (2 Replies)
Discussion started by: Shingoshi
2 Replies

4. Shell Programming and Scripting

Removal of a tag in the xml which occurs mutiple times

Hi, The tag can occur multiple times. I want to remove entire <SeqNum>..</SeqNum> from each line, regardless the values with in this tag. for each line value inside these tags could be different. So please suggest how to do this. Note: Each profile information is in one line. ... (2 Replies)
Discussion started by: Anusha_Reddy
2 Replies

5. UNIX for Dummies Questions & Answers

how to read how many times same result occurs?

Is there a way to read how many times each result occurs in a list, say the list.txt has the results: a c d a f c a d e and I need to know how many times each of them occurs such as : a=3 c=2 ..etc. (5 Replies)
Discussion started by: Iifa
5 Replies

6. Shell Programming and Scripting

Sed replace using same pattern repeating multiple times in a line

Sed replace using same pattern repeating multiple times in a line I have text like below in a file: I am trying to replace the above line to following How can I acheive this? I am able to do it if the occurrence is for 1 time: But If I try like below I am getting like this: I have to... (4 Replies)
Discussion started by: sol_nov
4 Replies

7. Shell Programming and Scripting

Sed/awk/perl command to replace pattern in multiple lines

Hi I know sed and awk has options to give range of line numbers, but I need to replace pattern in specific lines Something like sed -e '1s,14s,26s/pattern/new pattern/' file name Can somebody help me in this.... I am fine with see/awk/perl Thank you in advance (9 Replies)
Discussion started by: dani777
9 Replies

8. UNIX for Dummies Questions & Answers

Replace string and create new file multiple times

First of all, apologies if this has already been answered elsewhere. I haven't quite been able to find what I'm looking for yet, so hopefully this won't come across as repetition. I have a file consisting of ~100 nearly identical lines, each of which contains multiple instances of the string I... (11 Replies)
Discussion started by: pseudo.seppuku
11 Replies

9. Shell Programming and Scripting

Counting number of times content in columns occurs in other files

I need to figure out how many times a location (columns 1 and 2) is present within a group of files. I figured using a combination of 'while read' and 'grep' I could count the number of instances but its not working for me. cat file.txt | while read line do grep $line *08-new.txt | wc -l... (6 Replies)
Discussion started by: ncwxpanther
6 Replies

10. Shell Programming and Scripting

sed command to replace multiple column in one go

Hi, I want to replace the value in more than one column. For one column ,following command is working - sed 's/./$value_to_replace/$column number' file_name e.g. suppose this is input 1111000000 command - sed 's/./M/5' output= 1111M000000 For two column also command is like - cat... (22 Replies)
Discussion started by: Preeti Chandra
22 Replies
LOTRS(3)						 MBK LOGICAL STRUCTURE DEFINITIONS						  LOTRS(3)

NAME
lotrs - mbk logical transistor DESCRIPTION
The lotrs is used to describe a logical transistor. It is mostly used to describe leaf cells in terms of transistors interconnections, and as a result of layout extractions. Since the only target technology is CMOS, only NMOS and PMOS transistors are used. The declarations needed to work on lotrs are available in the header file "/labo/include/mlo.h". The following C structure supports the description of the logical transistor : typedef struct lotrs { struct lotrs *NEXT; struct locon *DRAIN; struct locon *GRID; struct locon *SOURCE; struct locon *BULK; char *TRNAME; long X,Y; unsigned short WIDTH, LENGTH; unsigned short PS, PD; unsigned short XS, XD; char TYPE; struct ptype *USER; } lotrs_list; NEXT Pointer to the next lotrs of the list. DRAIN Pointer to the drain connector of the transistor. This connector is, of course unique. See locon(3) for details. GRID Pointer to the grid connector of the transistor. This connector is, of course unique. See locon(3) for details. SOURCE Pointer to the source connector of the transistor. This connector is, of course unique. See locon(3) for details. BULK Pointer to the bulk connector of the transistor. This connector is, of course unique. See locon(3) for details. TRNAME Transistor instance name X, Y Coordinates of the transistor in a layout. These informations have sens only if the transistor netlist is the result of a layout extraction. They are otherwise set to zero. These coordinates are given in micron times the scale factor SCALE_X, since the extracted view is technology dependant. WIDTH, LENGTH Respectivly width and length of the transistor grid. PS, PD Respectivly perimeter of the source and drain, in micron times the scale factor SCALE_X. XS, XD These values are needed to compute respectivly the source and drain areas. Let As be the source area in square microns, and Width be the transistor grid width in micron, then lotrs->XS = As / Width * SCALE_X TYPE Canal type of the transistor. Six legal values are available : TRANSN N type MOS transistor TRANSP P type MOS transistor TRANSN_FAST High speed N type MOS transistor TRANSP_FAST High speed P type MOS transistor TRANSN_HVIO Low Leakage N type MOS transistor TRANSP_HVIO Low Leakage P type MOS transistor USER Pointer to a ptype list, see ptype(3) for details, that is a general purpose pointer used to share informations on the transistor. Remark : In integrated techniques, NMOS transistor bulk for digital circuits is always set to ground, and PMOS transistor bulk for digital circuits is always set to positive supply. SEE ALSO
mbk(1), addlotrs(3), dellotrs(3), locon(3), lofig(3), ptype(3). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 August 6, 2002 LOTRS(3)
All times are GMT -4. The time now is 07:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy