Sponsored Content
Full Discussion: NAWK Script not working fine
Top Forums Shell Programming and Scripting NAWK Script not working fine Post 302203485 by dheeraj19584 on Monday 9th of June 2008 03:02:12 AM
Old 06-09-2008
Thanks for your reply,

Input file looks like a report like this
Currency: JPY
SOBP=xxx (JAPAN)
ORG ACCT PR SOB PTD LOCAL
--------- ---- -- ---
Hardware
801140xxx 51 801 3,999,638.00
Software
80x140xxx 31 801 648,000.00
80x140xxx 31 801 1,596,400.00
80x140xxx 51 801 818,922.00
80x140xxx 31 801 121,415.00


And output file looks like

xx|106|07-07|1120xxxxx|112|S/W|02|USD| xxxxxx|1043|0x/1x/200x
xx|106|07-07|1120xxxxx|112|S/W|51|USD| xxxxxx|1043|0x/1x/200x

basically, input file is parsed to generate pipe delimited file which contains the information from input file.

What is happening here is, the no. of records does not equals the records in input file.

and also some special characters gets inserted in output file..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to know whether my perodic thread is working fine

Dear All, I am using xenomai-2.4 along with linux kernel 2.6 In my application having following threads. 8ms perodic thread (RT TASK) 1ms perodic thread(RT TASK) 16ms perodic thread(RT TASK) 256ms perodic thread(RT TASK) 22 - pthread are condition based it may execute or else in... (1 Reply)
Discussion started by: rajamohan
1 Replies

2. Solaris

GUI not working... CLI is working fine

Hello, I have X4500 running Solaris 10. I can access it through CLI but I cannot see the GUI. When I reboot it, the GUI works till all the files are loaded (ie., the initial boot sequence) and it prompts me to enter username and password and there it ends. The screen just has a blinking cursor... (4 Replies)
Discussion started by: bharu_sri
4 Replies

3. Shell Programming and Scripting

Nawk Script not working

Any idea why this isn't working? YESTERF=`TZ=aaa24 date +%b"-"%d | sed 's/-0/--/'` filelist2=$(find /export/home/gen/cks/traces \( -name \*YESTERF\* -name \*DNA\* \) -print | tr '\n' ' ') print "Date/Time,Location,Shelf,IP,Reason,Log Filename" >> $OUTPUT nawk -F':' ' $2 ~... (2 Replies)
Discussion started by: ther2000
2 Replies

4. Shell Programming and Scripting

Getting issue while running it from cron while manually working fine

Hello, I am working one one script where I am using the below code which is using to connect with MKS client when I run my script manually it works effiecently i.e. it connects with MKS client but when I run it from CRON it doesn't connect. 1)Can some one tell when it is running from cron... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies

5. Shell Programming and Scripting

Sed script not working properly on Solaris (works fine on AIX)?

Hi, I have a problem with a SED script that works fine on AIX but does not work properly on a Solaris system. The ksh script executes the SED and puts the output in HTML in tables. But the layout of the output in HTML is not shown correctly(no tables, no color). Can anyone tell if there is... (7 Replies)
Discussion started by: Faith111
7 Replies

6. Shell Programming and Scripting

Script not working in cron but working fine manually

Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies

7. Shell Programming and Scripting

Getting Command not found error Even though Script is working fine

Hi friends, I am using below script to do some work. But even though script is working fine but while executing it i am getting command not found error. :( Here is the script :- #!/bin/sh Names="name.txt" ###main##### for LINE in `cat ${Names}` do ... (3 Replies)
Discussion started by: harpal singh
3 Replies

8. Shell Programming and Scripting

sed command not working inside ksh script but works fine outside

Hi, I am a bit confused ,why would a sed command work fine outside of ksh script but not inside. e.g I want to replace all the characters which end with a value and have space at end of it. so my command for it is : sed -i "s/$SEPARATOR /$SEPARATOR/g" file_name This is working fine in... (8 Replies)
Discussion started by: vital_parsley
8 Replies

9. Shell Programming and Scripting

Nawk command not working for Question mark (?)

Hi Folks, I am facing an issue with nawk command. The data is as below: ABC0022,BASC,Scene Package,INR,02May17,XXX4266,be?. Hotel,3,AW01,Twin Room,61272,41308,39590,39590,X,X ABC0022,BASC,Scene Package,INR,02May17,XXX4266,be?. Hotel,3,AW02,Twin Room with Balcony,9272,85638,4520,9590,X,X... (1 Reply)
Discussion started by: kirans.229
1 Replies

10. Shell Programming and Scripting

--SunOS 5.10 nawk for paragraph not working

The machine is using bash: ================== bash -version GNU bash, version 3.2.51(1)-release (i386-pc-solaris2.10) Copyright (C) 2007 Free Software Foundation, Inc. ========================= I have the following xml file. am trying to get a whole paragraph if it meets certain criteria.... (9 Replies)
Discussion started by: gilgamesh
9 Replies
DT2DV(1)						      General Commands Manual							  DT2DV(1)

NAME
dt2dv - convert a DTL text representation of a TeX DVI file to a binary DVI file SYNOPSIS
dt2dv [-debug] [-group] [-si] [-so] [input-DTL-file] [output-DVI-file] In the absence of the -si and -so options, both file arguments are required in the order input-DTL-file output-DVI-file . But also see the OPTIONS section below. No default file extensions are supplied. DESCRIPTION
dt2dv converts a text representation of a TeX DVI file, usually produced by the companion dv2dt(1) utility, back to a binary DVI file. DTL (DVI Text Language) files can be edited, with care, and then restored to DVI form for processing by any TeX DVI driver program. In DTL files, font directory names and font names are preceded by a length field, which must be updated if the names are modified. dvitype(1) can also display a textual representation of DVI files, but in some implementations at least, it cannot be used in batch mode, and its output is not well-suited for conversion back to a DVI file. The format of TeX DVI files is fully described in Donald E. Knuth, TeX: The Program, Addison-Wesley (1986), ISBN 0-201-13437-3, as well as in the dvitype(1) literate program source code. Brief descriptions of the DTL and DVI formats are given in dv2dt(1). OPTIONS
-debug Turn on detailed debugging output. -group Expect each DTL command to be in parentheses. -si Read all DTL commands from standard input. -so Write all DVI commands to standard output. SEE ALSO
dv2dt(1), dvitype(1), tex(1). FILES
*.dvi binary TeX DVI file. *.dtl text representation of a TeX DVI file in DVI Text Language format. AUTHOR
dt2dv and dv2dt(1) were written by Geoffrey Tobin Department of Electronic Engineering La Trobe University Bundoora, Victoria 3083 Australia Tel: +61 3 479 3736 FAX: +61 3 479 3025 Email: <G.Tobin@ee.latrobe.edu.au> These manual pages were written primarily by Nelson H. F. Beebe, Ph.D. Center for Scientific Computing Department of Mathematics University of Utah Salt Lake City, UT 84112 Tel: +1 801 581 5254 FAX: +1 801 581 4148 Email: <beebe@math.utah.edu> Version 0.6.0 08 March 1995 DT2DV(1)
All times are GMT -4. The time now is 02:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy