Sponsored Content
Full Discussion: AWK : copy file with changes
Top Forums Shell Programming and Scripting AWK : copy file with changes Post 302354726 by vidyadhar85 on Saturday 19th of September 2009 02:09:31 PM
Old 09-19-2009
awk can do...
Code:
awk '!/^#/&&/ABC/&&/CONN/{gsub(/xyz/,"abc")}1' filename

 

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
gnomevfs-copy(1)						   User Commands						  gnomevfs-copy(1)

NAME
gnomevfs-copy - copy a file from one VFS location to another SYNOPSIS
gnomevfs-copy source-URI destination-URI DESCRIPTION
gnomevfs-copy is obsolete. It has been superseded by gvfs-copy. See gvfs-copy(1). gnomevfs-copy copies a file from one URI location to another, using the virtual file system. OPERANDS
The following operands are supported: source-URI Specifies the source file location in standard URI format. destination-URI Specifies the destination file or directory location in standard URI format. EXAMPLES
Example 1: Copying a File From a Web Server to a Local File example% gnomevfs-copy http://www.sun.com file:///home/user/index.html ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: NLSPATH. EXIT STATUS
The exit value 0 is returned regardless of success or failure. FILES
The following files are used by this application: /usr/bin/gnomevfs-copy Executable to copy a file from one VFS location to another ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-vfs | +-----------------------------+-----------------------------+ |Interface stability |Obsolete Volatile | +-----------------------------+-----------------------------+ SEE ALSO
gnomevfs-cat(1), gnomevfs-info(1), gnomevfs-ls(1), gnomevfs-mkdir(1), gvfs-copy(1), attributes(5), environ(5) NOTES
Written by Stephen Browne, Sun Microsystems Inc., 2004. SunOS 5.11 14 May 2008 gnomevfs-copy(1)
All times are GMT -4. The time now is 10:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy