Sponsored Content
Top Forums Shell Programming and Scripting sed to replace specific positions on line with file contents Post 302771934 by nwalsh88 on Friday 22nd of February 2013 07:29:18 AM
Old 02-22-2013
Hi balajesuri,

That's perfect, thanks for your help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using sed to replace a specific string on a specific line number using variables

using sed to replace a specific string on a specific line number using variables this is where i am at grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies

2. Shell Programming and Scripting

Need specific byte positions of a file

Hello , I need to extract data from specific byte positions of a file. I have tried the below command awk ' { printf "%s", substr($0, 642363,642369}' filename to extract data between byte positions 642363 and 642369 . However I did not get the expected result. I am new to awk... (6 Replies)
Discussion started by: rmv
6 Replies

3. Shell Programming and Scripting

awk script replace positions if certain positions equal prescribed value

I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX. awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Discussion started by: halplessProblem
9 Replies

4. Shell Programming and Scripting

How to replace specific contents in a file?

From the existing file, I need to replace specific contents possibly with var every time when the user changes the var. e.g the contents in the file file.txt is 'My name is $n and I am $y years old' and every time user changed the var outside the file, the contents of the file should be created... (4 Replies)
Discussion started by: Emilywu
4 Replies

5. Shell Programming and Scripting

Replace specific field on specific line sed or awk

I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work. Brief overview: I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies

6. Shell Programming and Scripting

sed command to replace a line at a specific line number with some other line

my requirement is, consider a file output cat output blah sdjfhjkd jsdfhjksdh sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf hellow there this doesnt look good et cetc etc etcetera i want to replace a line of line number 4 ("this doesnt look good") with some other line ... (3 Replies)
Discussion started by: vivek d r
3 Replies

7. Shell Programming and Scripting

sed - Replace string with file contents

Hello, I have two files: file1 and file2 file1 has the following info: --- host: "localhost" port: 3000 reporter_type: "zookeeper" zk_hosts: - "localhost:2181" file2 contains an IP address (1.1.1.1) What I want to do is replace localhost with 1.1.1.1, so that the... (4 Replies)
Discussion started by: Jay Kah
4 Replies

8. Emergency UNIX and Linux Support

sed replace file contents by reading from another file

Hello, My input file1 is like this by tab-delimited chr1 mm10_knownGene stop_codon 3216022 3216024 0.000000 - . gene_id "uc007aeu.1"; transcript_id "uc007aeu.1"; chr1 mm10_knownGene CDS 3216025 3216968 0.000000 - 2 gene_id "uc007aeu.1"; transcript_id "uc007aeu.1"; ... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

9. Shell Programming and Scripting

Search and replace specific positions of specific lines

Hi, I have a file with hundreds of lines. I want to search for particular lines starting with 4000, search and replace the 137-139 position characters; which will be '000', with '036'. Can all of this be done without opening a temp file and then moving that temp file to the original file name. ... (7 Replies)
Discussion started by: dsid
7 Replies

10. UNIX for Beginners Questions & Answers

Replace specific positions in a file

I have a fixed-length positional file. I am trying to replace content of position 4-13 (length=10) with xxxxxxxxxx. Sample 2 rows in this file: H0187459823 172SMITH, JOE H0112345678 172DOE, JANE In this example 87459823 (from 1st line) and 12345678 (from 2nd line) (both in position... (3 Replies)
Discussion started by: Diver181
3 Replies
IAC(1)							       PolyORB documentation							    IAC(1)

NAME
iac - PolyORB's IDL-to-Ada compiler SYNOPSIS
iac opts file [-cppargs args] DESCRIPTION
iac is an IDL-to-Ada compiler, compliant with version 1.2 of the "Ada Language Mapping Specification" produced by the OMG. OPTIONS
iac accepts the following options: -E Preprocess only. -k Keep temporary files. -p Produce source on standard output. -o DIR Specify output directory. -dm Generate debug messages when analyzing scopes -df Dump the frontend tree (the IDL tree) -cppargs ARGS Pass ARGS to the C++ preprocessor. -I dir Shortcut for -cppargs -I dir. -nocpp Do not preprocess input -<lang> Generate code for a supported language types Generate a list of all types present in the IDL file -p Print the list generate ada Generate Ada source code -i Generate implementation template. -c Generate client side code. -s Generate server side code. -d Generate delegation package. (defunct) -ir Generate code for interface repository.(defunct) -noir Don't generate code for interface repository (default). -hc Using perfect minimal hash tables in skeletons and minimize CPU time -hm Using perfect minimal hash tables in skeletons and minimize memory space -rs Use the SII/SSI to handle requests -rd Use the DII/DSI to handle requests (default) -da Dump the Ada tree -db Generate only the package bodies -ds Generate only the package specs -dw Output the withed entities -dt Output tree warnings -di Generate code for imported entities idl Dump parsed IDL file -b n Base to output integer literal As a default (zero) use base from input -e Expand IDL Tree -df Dump IDL Tree (may be used in conjunction with -e to dump the expanded IDL tree) -di Output IDL code of imported entities (may be used in conjunction with -e to output the expanded IDL code) EXIT STATUS
iac returns one of the following values upon exit: 0 Successful completion 1 Usage error 2 Illegal IDL specification AUTHORS
The PolyORB team, polyorb-devel@lists.adacore.com. SEE ALSO
The PolyORB WWW page, http://libre.adacore.com/polyorb/ PolyORB team April 26, 2007 IAC(1)
All times are GMT -4. The time now is 10:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy