Sponsored Content
Top Forums Shell Programming and Scripting Find a blank field and replace values to NA Post 302847117 by vgersh99 on Monday 26th of August 2013 10:57:35 AM
Old 08-26-2013
it should be straight forward, What have you tried?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find and replace a field in the last line

I have a file 'test.out' with contents: 1|1|10|10|I|asdf| 2|1|10|10|I|sdfg| 4|1|10|10|I|hgfj| 34|0|10|10|I|sdg| I want to modify the fifth column with value 'I' to 'A' for only the last line. Below is what I expect to see: 1|1|10|10|I|asdf| 2|1|10|10|I|sdfg| ... (3 Replies)
Discussion started by: ChicagoBlues
3 Replies

2. Shell Programming and Scripting

finding field count escaping the blank values

Hi All I have a file.Below are few records of the file. sample.txt CPS,ES,843232910001,ESF81462,W N LINDSAY LTD,01674840629,09-FEB-2009,23-FEB-2009,CDR735,ALL CALLS,01674840629 CPS,ES,843232670001,ESF81462,W N LINDSAY LTD,01674840629,09-FEB-2009,23-FEB-2009,CDR734,ALL... (2 Replies)
Discussion started by: king007
2 Replies

3. Shell Programming and Scripting

Find top N values for field X based on field Y's value

I want to find the top N entries for a certain field based on the values of another field. For example if N=3, we want the 3 best values for each entry: Entry1 ||| 100 Entry1 ||| 95 Entry1 ||| 30 Entry1 ||| 80 Entry1 ||| 50 Entry2 ||| 40 Entry2 ||| 20 Entry2 ||| 10 Entry2 ||| 50... (1 Reply)
Discussion started by: FrancoisCN
1 Replies

4. Shell Programming and Scripting

Replace blank values for string using sed

Hi everyone, I was wondering how could from a file where each row is separated by tabulations, the row values where are in blank replace them by a string or value. My file has this form: 26/01/09 13:45:00 0 0 26/01/09 14:00:00 1495.601318 0 26/01/09 14:15:00 1495.601318 0 ... (4 Replies)
Discussion started by: tonet
4 Replies

5. Shell Programming and Scripting

Find and replace blank in the last field

Hi all, I have a huge file and I need to get ride of the fields 6-11 and replace the blanks in field 5 with a missing value(99999). 159,93848,5354,343,67898,45,677,5443,434,5545,45 677,45545,3522,244, 554,54344,3342,456, 344,43443,2344,444,23477... (12 Replies)
Discussion started by: GoldenFire
12 Replies

6. Shell Programming and Scripting

replace blank field in file 2 with content of file 1

Something like vlookup in excel, column 2 in file 2 is blank and should be replaced by column 2 in file 1 based on comparing column 1 in both files. file1 Code: 1234~abc~b~c~d~e~f~g~h~09/10/09 5678~def~b~c~d~e~f~g~h~12/06/10 8910~hij~b~c~d~e~f~g~h~03/28/13... (1 Reply)
Discussion started by: sigh2010
1 Replies

7. Shell Programming and Scripting

Replace a field where values are null in a file.

Hi, I've a pipe delimited file and wanted to replace the 3rd field to 099990 where the values are null. How can I achieve it using awk or sed. 20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S 20130516|00000061|02210|111554|03710|2|205069|SM APPL $80-100 RTL|S... (12 Replies)
Discussion started by: rudoraj
12 Replies

8. Shell Programming and Scripting

Find a blank field

Find a blank field Hi I have set of fields that have some blank values, how to find that and get its line noumbers in output file. Ex: Col1 col2 col3 11 ss 103 12 104 13 105 14 se 106 (2 Replies)
Discussion started by: Shenbaga.d
2 Replies

9. UNIX for Beginners Questions & Answers

How to replace the field values, which are greater than the specified value with TRUE?

I have a csv file as given below, org1 org2 org3 org4 org5 gene1 100 80 90 80 150 gene2 30 70 50 50 115 gene3 40 120 60 40 105 gene4 20 72 40 60 20 I need to replace the fields are having values greater than 100 with "TRUE". I used the following commands to replace... (6 Replies)
Discussion started by: dineshkumarsrk
6 Replies
dot-forward(1)						      General Commands Manual						    dot-forward(1)

NAME
dot-forward - read a .forward file under qmail SYNOPSIS
in ~/.qmail: | dot-forward [ -nN ] file ... OVERVIEW
dot-forward forwards incoming messages according to sendmail-style instructions in file, if file exists. Normally file is .forward. WARNING: If you create a .qmail file to enable dot-forward, make sure to add a second line specifying delivery to your normal mailbox. For example: |dot-forward .forward ./Mailbox COMPATIBILITY WARNING: dot-forward does not support :include: or mbox deliveries. You can use the delivery mechanism described in dot- qmail(5) instead. OPTIONS
-N (Default.) Read and forward a message. -n Parse file and print the forwarding instructions in it, one per line; do not follow the instructions. You can use this option from the command line to see how your .forward file will be interpreted: dot-forward -n .forward FILE HANDLING
When a message arrives, dot-forward opens file and handles it as discussed below. It exits 99, so qmail-local will ignore further instruc- tions in .qmail. Exception: If file specifies delivery directly to you, dot-forward exits 0, so qmail-local will read further instructions in .qmail. If file does not exist, dot-forward exits 0. You can list several files; then dot-forward will try each one in turn, using the first one that exists, or exiting 0 if none exist. COMPATIBILITY WARNING: dot-forward treats an empty file as if it did not exist. Versions of sendmail before V8 would throw away the incom- ing message. COMPATIBILITY WARNING: If dot-forward encounters a temporary error opening file, it exits 111, so that qmail-local will try again later. sendmail assumes incorrectly that file does not exist. COMPATIBILITY WARNING: file must be readable by dot-forward, which is normally running as the user. sendmail places different constraints on its .forward permissions, since it is normally running as root. FORWARDING
Normally file contains an address. dot-forward forwards the message to that address. The address is parsed as if it were in an RFC 822 message header. Parenthesized comments and bracketed addresses are permitted: bob (Bob, the postmaster) @heaven.af.mil Addresses with special characters must be quoted: "spaced out mailbox"@heaven.af.mil Address groups are not permitted. file can contain any number of lines, each line containing any number of addresses. dot-forward forwards the message to each address: bob, fred, susan Joe Shmoe <shmoe@heaven.af.mil> An address without a fully qualified domain name is handled as described in qmail-header(5). Exception: Certain addresses without domain names are handled specially, as described below. DIRECT DELIVERY
If an address does not contain a domain name, and matches the environment variable $USER (without regard to case), it specifies delivery directly to you. If an address matches $USER@$HOST (without regard to case), it specifies delivery directly to you. COMPATIBILITY WARNING: sendmail's handling of quotes and backslashes violates RFC 821 and RFC 822, and is not supported by dot-forward. dot-forward treats joe the same way as joe. The dot-qmail delivery mechanism lets each user manage several addresses, so there is no need for a special syntax to get around forwarding. COMMANDS
If an address does not contain a domain name, and begins with a vertical bar, dot-forward takes the rest of the address as a command to run: bob, "|vacation bob" dot-forward feeds the message to the command, preceded by the environment variables $UFLINE, $RPLINE, and $DTLINE. COMPATIBILITY WARNING: Internet addresses can legitimately start with a slash or vertical bar. dot-forward treats anything with an unquoted @ as an address. sendmail appears to have various problems coping with these addresses, and with commands that contain @ signs. COMMENTS
Any line in file that begins with # is ignored: # this is a comment COMPATIBILITY WARNING: Versions of sendmail before V8 did not allow comments in .forward files. VERSION
This is dot-forward 0.71. The dot-forward home page is http://pobox.com/~djb/dot-forward.html. SEE ALSO
qmail-header(5), dot-qmail(5) dot-forward(1)
All times are GMT -4. The time now is 02:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy