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
dlcosmk(7ipp)						   IP Quality of Service Modules					     dlcosmk(7ipp)

NAME
dlcosmk - Data Layer Class of Service Marker DESCRIPTION
The dlcosmk marker is an action module that is executed as a result of classifying or metering packets. It marks the packet with a user priority defined by the IEEE 801.D standard. This feature is only possible on a VLAN device. The 3-bit user priority is part of the 802.1Q VLAN header tag that is part of the ethernet header (carrying the IP packet). STATISTICS
The dlcosmk module exports the following statistics through kstat: Global statistics: module: dlcosmk instance: <action id> name: dlcosmk statistics class <action name> crtime snaptime b_band <b_band value> dl_max <dl_max value> usr_pri <configured CoS> npackets <number of packets> epackets <number of packets in error> ipackets <number of packets not processed> FILES
/kernel/ipp/sparcv9/dlcosmk 64-bit module (SPARC only.) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWqos | +-----------------------------+-----------------------------+ SEE ALSO
ipqosconf(1M), dscpmk(7IPP), flowacct(7IPP), ipqos(7IPP), ipgpc(7IPP), tokenmt(7IPP), tswtclmt(7IPP) SunOS 5.10 29 Sep 2004 dlcosmk(7ipp)
All times are GMT -4. The time now is 08:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy