Sponsored Content
Full Discussion: AWK : copy file with changes
Top Forums Shell Programming and Scripting AWK : copy file with changes Post 302356232 by gowri_g_s on Friday 25th of September 2009 02:15:57 AM
Old 09-25-2009
Hi Vidhyadhar,
I use Solaris 10.

----------------

Hi rdcwayx,
nawk worked well in the example above.

But, It did not work with the following line,
DEFINE CHNL(TO.ABC.DEF) CHLTYPE(SDR) XMITQ(ABC.TRANS.Q) TRPTYPE(tcp) CONNAME('abcghij.pqr.com(1010)') REPLACE

I wanted to repalce the abcghij after CONNAME to say, pqrstuv.
I really cant figure it out why it did not work. Sorry for the trouble.

Thanks a bunch to both of you.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to copy multiple lines from a file to another using AWK?

Hi, I have a abc.txt file. In this file there is a SQL query which Iwant to copy and print it on another file.The query (for eg) is written like this: SELECT field1, field2, field3 from table1,table2 where <conditions> END I want to copy this query to another... (3 Replies)
Discussion started by: jisha
3 Replies

2. Shell Programming and Scripting

copy/paste with awk

Hi everybody, I have two XML files. I am working on a script that could copy and paste the contents of the first xml file to the desired location in the second xml file. Here is my first XML file. This is the second XML file. Finaly, I wnat to obtain something like that : ... (2 Replies)
Discussion started by: lsaas
2 Replies

3. Shell Programming and Scripting

Perl or Awk script to copy a part of text file.

Hi Gurus, I'm a total newbie to Perl and Awk scripting. Let me explain the scenario, there is a DB2 table with 5 columns and one of the column is a CLOB datatype containing XML. We need all the 4 columns but only a portion of string from the XML column. We decided to export DB2 table to a .del... (26 Replies)
Discussion started by: asandy1234
26 Replies

4. Shell Programming and Scripting

Copy respective path next to last column with awk

Hi to all, I have the short print out sample of the DOS command "dir S/" as showed below. Directory of C:\Program Files\Winamp\Skins\Bento\window 02/12/2010 11:35 p.m. <DIR> . 02/12/2010 11:35 p.m. <DIR> .. 11/12/2009 10:31 a.m. 13,556... (3 Replies)
Discussion started by: cgkmal
3 Replies

5. Shell Programming and Scripting

how to copy the directory but not copy certain file

Hi experts cp bin root src /mnt but not copy bin/bigfile any help? ( I post this thread in the "redhat" forum wrongly, I don't know how to withdraw that question in that wrong forum) Thanks (6 Replies)
Discussion started by: yanglei_fage
6 Replies

6. Shell Programming and Scripting

Copy entire file to a new file in awk

Hi, How do we write the contents of multiple files created in awk body to a new file in awk (END block) ? when I used "getline", it is consuming more time. Do we have any other way other than getline? (1 Reply)
Discussion started by: Cool
1 Replies

7. Shell Programming and Scripting

Use sed/awk to do like copy and paste

I have rrd file which is have the gaps and I want to fill it out with some value , I've got 10 NaN record and I try to populate data from 10 records be for NaN to change instead of NaN :( <!-- 2016-05-19 14:10:00 CST / 1463638200 -->... (11 Replies)
Discussion started by: boobytrap
11 Replies

8. Shell Programming and Scripting

awk copy first column in new lines

Hi all i have table like this input001_1_174 j 474536 482492 mo001_1_175 j 960192 966656 .ire 966656 984416 .uf/i want copy number of first line to other line... (10 Replies)
Discussion started by: alii
10 Replies

9. Shell Programming and Scripting

awk executes and works but only on copy of file

The tab-delimited file below using the awk produces a blank output. However, when I copy the same lines in file to a new document and execute the awk I get the desired result. The awk counts the unique characters before the : in $7 according to the id in $1. The awk seems to work but I can not... (5 Replies)
Discussion started by: cmccabe
5 Replies
ici::doc::pod3::sdrstring(3)				       ICI library functions				      ici::doc::pod3::sdrstring(3)

NAME
sdrstring - Simple Data Recorder string functions SYNOPSIS
#include "sdr.h" Object sdr_string_create (Sdr sdr, char *from); Object sdr_string_dup (Sdr sdr, Object from); int sdr_string_length (Sdr sdr, Object string); int sdr_string_read (Sdr sdr, char *into, Object string); DESCRIPTION
SDR strings are used to record strings of up to 255 ASCII characters in the heap space of an SDR. Unlike standard C strings, which are terminated by a zero byte, SDR strings record the length of the string as part of the string object. To store strings longer than 255 characters, use sdr_malloc() and sdr_write() instead of these functions. Object sdr_string_create(Sdr sdr, char *from) Creates a "self-delimited string" in the heap of the indicated SDR, allocating the required space and copying the indicated content. from must be a standard C string for which strlen() must not exceed 255; if it does, or if insufficient SDR space is available, 0 is returned. Otherwise the address of the newly created SDR string object is returned. To destroy, just use sdr_free(). Object sdr_string_dup(Sdr sdr, Object from) Creates a duplicate of the SDR string whose address is from, allocating the required space and copying the original string's content. If insufficient SDR space is available, 0 is returned. Otherwise the address of the newly created copy of the original SDR string object is returned. To destroy, use sdr_free(). int sdr_string_length(Sdr sdr, Object string) Returns the length of the indicated self-delimited string (as would be returned by strlen()), or -1 on any error. int sdr_string_read(Sdr sdr, char *into, Object string) Retrieves the content of the indicated self-delimited string into memory as a standard C string (NULL terminated). Length of into should normally be SDRSTRING_BUFSZ (i.e., 256) to allow for the largest possible SDR string (255 characters) plus the terminating NULL. Returns length of string (as would be returned by strlen()), or -1 on any error. SEE ALSO
sdr(3), sdrlist(3), sdrtable(3), string(3) perl v5.14.2 2012-05-25 ici::doc::pod3::sdrstring(3)
All times are GMT -4. The time now is 06:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy