Sponsored Content
Top Forums Shell Programming and Scripting Writing output into different files while processing file using AWK Post 302313055 by vidyak on Monday 4th of May 2009 01:41:14 PM
Old 05-04-2009
Oops, I had posted one record with blank value for first field. Not sure, how it appeared different when I submitted the contents Smilie
Well, let me try it in different way. Below are the contents of the file.

Line 1: A123456 11111
Line 2: B123456 22222
Line 3: C123456 33333
Line 4: 44444
Line 5: D123456 55555

In above example, line 4 does not contain contents for fld1 and hence should be written to Reject file. Does this help?

Thanks and Regards,
Vidya
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

single output of awk script processing multiple files

Helllo UNIX Forum :) Since I am posting on this board, yes, I am new to UNIX! I read a copy of "UNIX made easy" from 1990, which felt like a making a "computer-science time jump" backwards ;) So, basically I have some sort of understanding what the basic concept is. Problem Description:... (6 Replies)
Discussion started by: Kasimir
6 Replies

2. Shell Programming and Scripting

Processing files using awk

Hi I have files in our UNIX directory like the below -rw-r--r-- 1 devinfo devsupp 872 Sep 14 02:09 IMGBTREE27309_12272_11_1_0_FK.idx0 -rw-r--r-- 1 devinfo devsupp 872 Sep 14 02:09 IMGBTREE27309_12272_11_0_0_PK.idx0 -rw-r--r-- 1 devinfo devsupp 432 Sep 14... (7 Replies)
Discussion started by: rbmuruga
7 Replies

3. Shell Programming and Scripting

processing the output of AWK

Hi my input file is <so > < Time > <Pid> <some ro><Job Name> 111004 04554447 26817 JOB03275 MBPDVLOI 111004 04554473 26817 JOB03275 MBPDVLOI 111004 04554778 26807 JOB03276 MBPDVAWD 111004 04554779 26807 JOB03276 MBPDVAWD 111004 04554780 26817 ... (4 Replies)
Discussion started by: rakeshkumar
4 Replies

4. UNIX for Dummies Questions & Answers

Writing a loop to manipulate a script and store it in multiple output files

I have a script where the the 9th line looks like this: $filename=sprintf("250.1chr%d.ped", $N); I want to modify this script 1000 times, changing 250.1chr%d.ped to 250.2chr%d.ped, 250.3chr%.ped.......and so on all the way to 250.1000chr%d.ped and store each output in files called ... (4 Replies)
Discussion started by: evelibertine
4 Replies

5. UNIX for Dummies Questions & Answers

Use awk to pipe output from one file into multiple files

Hi All. Thanks for your help in advance. I have a requirement to examine the number of delimiters in each record of a file. If the record has the expected number of delimiters it should be passed into a 'good' file. If it does not, the record should be passed into a 'bad' file. I have been able... (8 Replies)
Discussion started by: codestar1
8 Replies

6. Shell Programming and Scripting

Problem with writing to output - awk, echo

Hello all, I wrote this command line for some calculation on my given input files based on another input file which is a txt file. while read BAM REGION; do samtools view $BAM $REGION | awk '{if ($2==0) print $0}' | wc -l >>log.txt; echo "$REGION"; done >> log.txt <regions.txt It takes... (4 Replies)
Discussion started by: @man
4 Replies

7. Programming

awk processing / Shell Script Processing to remove columns text file

Hello, I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this : This is the output of ls command : I stored the output in a file filelist 1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies

8. Shell Programming and Scripting

Writing the output of set -x into Log files

Hi Guys, I am using set -x in my script to track the flow of the script. But if i want to write the output of the set -x into a log file, how do i do it? Thanks, Ajay (3 Replies)
Discussion started by: Ajay Venkatesan
3 Replies

9. UNIX for Dummies Questions & Answers

awk - Rename output file, after processing, same as input file

I have one input file ABC.txt and one output DEF.txt. After the ABC is processed and created output, I want to rename ABC.txt to ABC.orig and DEF to ABC.txt. Currently when I am doing this, it does not process the input file as it cannot read and write to the same file. How can I achieve this? ... (12 Replies)
Discussion started by: High-T
12 Replies

10. Shell Programming and Scripting

Using awk to output matches between two files to one file and mismatches to two others

I am trying to output the matches between $1 of file1 to $3 of file2 into a new file match. I am also wanting to output the mismatches between those same 2 files and fields to two separate new files called missing from file1 and missing from file2. The input files are tab-delimited, but the... (9 Replies)
Discussion started by: cmccabe
9 Replies
ipentry(n)						    An IP address entry widget							ipentry(n)

__________________________________________________________________________________________________________________________________________________

NAME
ipentry - An IP address entry widget SYNOPSIS
package require Tcl 8.4 package require Tk 8.4 package require ipentry ?0.3? ::ipentry::ipentry pathName ?option value...? ::ipentry::ipentry6 pathName ?option value...? pathName complete pathName get pathName insert iplist pathName icursor index pathName configure option value... pathName cget option _________________________________________________________________ DESCRIPTION
This package provides a widget for the entering of a IP address. ::ipentry::ipentry pathName ?option value...? Creates a new IPv4 ipentry widget and configures it with the given options and their values. ::ipentry::ipentry6 pathName ?option value...? Creates a new ipentry widget for the entry of an IPv6 address. All options are the same as the IPv4 widget. Each widget created with the command above supports the following methods: pathName complete Returns a boolean value. True indicates that the entry contains a complete IP address, meaning all fields have a value. In some cases IPv6 address are valid when fields are missing. You will need to do your own validation to detect this. pathName get Returns the contents of the entry as a list consisting of 4 or 8 elements. pathName insert iplist IPv4 Takes a list of 4 elements and inserts one into each quad of the entry, in order. All values in the list must be empty or integers. Values outside the range 0 to 255 are modified to be within the range. IPv6 Takes a list of 8 elements and inserts one into each quad of the entry, in order. All values in the list must be empty or 1 to 4 hex digits. pathName icursor index Sets the position of the widgets insertion cursor. Only integer values between 0 and 15 are valid for ipentry and 0 to 31 for ipen- try6. Setting the icursor will only have an effect if the widget already has the input focus. pathName configure option value... Modifies the configuration of the widget. For options and their meaning see the widget options section. pathName cget option Returns information about the current configuration of the widget, for the specified option. For options and their meaning see the widget options section. WIDGET OPTIONS
Command-Line Switch: -textvariable Database Name: textvariable Database Class: Variable The name of a variable which holds the value of the IP address. The value must be a string of the form NNN.NNN.NNN.NNN for IPv4 or HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH:HHHH for IPv6 where H is a hex digit. The variable will be modified to represent a valid IP address if it is not already. Command-Line Switch: -state Database Name: state Database Class: State Specifies one of three states for the entry: normal, disabled, or readonly. Command-Line Switch: -font Database Name: font Database Class: Font Command-Line Switch: -bd Database Name: borderWidth Database Class: BorderWidth Command-Line Switch: -fg Database Name: foreground Database Class: Foreground Command-Line Switch: -bg Database Name: background Database Class: Background Command-Line Switch: -relief Database Name: relief Database Class: Relief Command-Line Switch: -highlightthickness Database Name: highlightThickness Database Class: HighlightThickness Command-Line Switch: -highlightcolor Database Name: highlightColor Database Class: HighlightColor Command-Line Switch: -highlightbackground Database Name: highlightBackground Database Class: HighlightBackground Command-Line Switch: -selectbackground Database Name: selectBackground Database Class: Background Command-Line Switch: -selectforeground Database Name: selectForeground Database Class: Foreground Command-Line Switch: -selectborderwidth Database Name: selectBorderWidth Database Class: BorderWidth Command-Line Switch: -disabledbackground Database Name: disabledBackground Database Class: DisabledBackground Command-Line Switch: -disabledforeground Database Name: disabledForeground Database Class: DisabledForeground Command-Line Switch: -readonlybackground Database Name: readonlyBackground Database Class: ReadonlyBackground Command-Line Switch: -insertbackground Database Name: insertBackground Database Class: Background Standard widget options. See options for a description of their meanings and values. KEYWORDS
entry, ip address ipentry 0.3 ipentry(n)
All times are GMT -4. The time now is 04:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy