Sponsored Content
Full Discussion: Modify text file using awk
Top Forums Shell Programming and Scripting Modify text file using awk Post 302811191 by mehar on Thursday 23rd of May 2013 08:05:47 AM
Old 05-23-2013
This code is working only with first row. The second row remains the same. I want to replace the () and | in the 10th column in all the rows. i.e.
the data in the second row also should look like,
Quote:
chr1 602567 rs21953190 A G 5481.77 . 152 59.09 SYNONYMOUS_CODING LOW SILENT gaT/gaC D1034 ADNP2 protein_coding CODING ENSCAFT00000000008 5 GT:ADP:GQ:PL 1/1:0,151:151:99:5510,430,0

Last edited by mehar; 05-23-2013 at 09:56 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

modify file using awk

I have a file, a.asc which is generated from a shell script: -----BEGIN PGP MESSAGE----- Version: PGP 6.5.8 qANQR1DBwE4DR5PN6zVjZTcQA/9z5Eg94cwYdTnC7v+JUegQuJwHripqnyjFrEs/ejzKYCNmngbHHmf8V4K3uFkYyp74aFf+CdymA030RKs6ewOwkmqRW19oIXCgVe8Qmfg+/2KTq8XN =0QSP -----END PGP MESSAGE----- I want... (12 Replies)
Discussion started by: nattynatty
12 Replies

2. Shell Programming and Scripting

Modify a text or xml file

Hi all, I want to write a shell which would allow me to edit a text file or a xml file. Basically i want to add a new node in a existing xml file. The values for this new node are based on user input. Thanks in advance Zing (9 Replies)
Discussion started by: zing
9 Replies

3. Shell Programming and Scripting

Modify Specific Line of a Text File

Given a text file, how do you add a line of text after a specific line number? I believe I would want to use "sed" but I am unsure of the syntax. Thank you. Mike (5 Replies)
Discussion started by: msb65
5 Replies

4. Shell Programming and Scripting

Need help to modify perl script: Text file with line and more than 1 space

Dear Friends, I am beginner in Perl and trying to find the problem in a script. Kindly help me to modify the script. My script is not giving the output for the last field and followed text (LA: Language English). Input file & script as follows: Input file: Thu Mar 19 2:34:14 EDT 2009 STC... (3 Replies)
Discussion started by: srsahu75
3 Replies

5. UNIX for Dummies Questions & Answers

Modify Text File

Hi, I would like to remove any lines from a text file that begin with #, or that are blank. How can I do that with BASH? Mike (3 Replies)
Discussion started by: msb65
3 Replies

6. Shell Programming and Scripting

Modify text file using shell script

Hi, I have a text file which is following format - COL VAL ABC 1 ABC 2 ABC 3 ABC 4 ABC 5 My requirement is to search for a particular value (provided by user) in the file and comment the previous entries including that as well. E.g. If I search for number 3, then the output... (6 Replies)
Discussion started by: bhupinder08
6 Replies

7. Shell Programming and Scripting

Modify the text file by script

Hi All the Helpers! I have a text file which looks like input.txt.I would request to please suggest me how can I make this file look like output.txt input.txt VOP 111 0 1 2 DEM 111 0 222 333 444 555 879 888 987 888 989 VOP 118 0... (2 Replies)
Discussion started by: Indra2011
2 Replies

8. Shell Programming and Scripting

Modify one line in a plain text file

Hi everyone, I want to know, if there is a way to modify one line in a text file with unix script, with out re-writing all the file. For example, i have this file: CONFIGURATION_1=XXXX CONFIGURATION_2=YYYY CONFIGURATION_3=ZZZZ supose i have a command or function "modify" that... (7 Replies)
Discussion started by: Xedrox
7 Replies

9. Shell Programming and Scripting

Modify text file using sed

Hello all, I have some text files I need to do the following on: Delete banner page (lines 1-56) --I am doing this using sed Remove ^M --I am doing this using vi Remove trailer page --this can vary based on the contents of the file, it usually starts with *************************** I am... (5 Replies)
Discussion started by: jeffs42885
5 Replies

10. UNIX for Beginners Questions & Answers

Modify text file if found multiple pattern match for every line.

Looking for help, i have input file like below and want to modify to expected output, if can without create additional file, hope can direct modify it. have 2 thing need do. 1st is adding a word (testplan generation off) after ! ! IPG: Tue Aug 07 14:31:17 2018 2nd is adding... (16 Replies)
Discussion started by: kttan
16 Replies
ns_adp_puts(3aolserver) 				    AOLserver Built-In Commands 				   ns_adp_puts(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_adp_append, ns_adp_close, ns_adp_dump, ns_adp_flush, ns_adp_puts, ns_adp_stream, ns_adp_tell, ns_adp_trunc, ns_puts - ADP output com- mands SYNOPSIS
ns_adp_append string ?string ...? ns_adp_close ns_adp_dump ns_adp_flush ns_adp_puts ?-nonewline? string ns_adp_stream ns_adp_tell ns_adp_trunc ?length? ns_puts ?-nonewline? string _________________________________________________________________ DESCRIPTION
These commands enable adding to and manipulation of the ADP output buffer. See ns_adp for an overview on ADP pages. ns_adp_append string ?string ...? This command appends one or more strings to the ADP output buffer. For the case of a single argument, it is equivalent to ns_adp_puts -nonewline string. ns_adp_close This command can be used to flush and close the underlying HTTP connection. ADP execution continues after the connection is closed; any text appended to the output buffer after the close is simply discarded when processing is complete. ns_adp_dump This command returns the text of the ADP buffer. ns_adp_flush This command flushes the contents of the ADP buffer to the current connection or file channel. It will raise a Tcl exception if the underlying flush failed, for example, if the HTTP connection is closed or the channel write failed. Flushed content is returned in "chunked-encoding" format if the HTTP protocol version is at least 1.1 (normally the case for all modern browsers). A call to ns_adp_flush is not normally needed except for specialized applications as all content is automatically flushed at the end of a con- nection or on buffer overflow. (see ns_adp_ctl bufsize for details on buffer mangement). ns_adp_puts ?-nonewline? string This function appends the specified string to the ADP buffer. Unless the optional -nonewline argument is used, a newline will be appended to the page after the string. Note that the argument to ns_adp_puts is a single string unlike ns_adp_append which takes a variable number of strings to append. ns_adp_stream This function begins streaming mode for the ADP. All data currently in the ADP output buffer is flushed and any subsequent data will be output directly to the connection. It is equivalent to an ns_adp_flush followed by an ns_adp_ctl bufsize 0. ns_adp_tell This function returns the total number of bytes current in the ADP buffer. A buffer overflow or direct call to ns_adp_flush will reset this counter to zero so the result of ns_adp_tell may not return the total number of bytes eventually sent. ns_adp_trunc ?length? This function can be used to truncate output buffer to the requested size. This can be useful to trim unintended white space or to clear a result and generate an error message. Note that content already streamed to the client, if any, cannot be truncated. ns_puts ?-nonewline? string This command is a deprecated name for ns_adp_puts. SEE ALSO
ns_adp(n), ns_adp_include(n) KEYWORDS
ADP, dynamic pages AOLserver 4.5 ns_adp_puts(3aolserver)
All times are GMT -4. The time now is 12:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy