If the first 8 columns matches in the two records then we should append the data as one records as shown below:
I am using nawk to achieve this.
---
But though first 8 columns are matching due to a question mark (?) in 7th column "be?. Hotel" i am not achieving proper output which should be in a single line.
But i am getting it as 2 separate rows.
When there is no question mark (?) in the data, nawk is giving proper output.
Can you please help me out in understanding as to why a question mark (?) is causing an issue and how to mitigate this?
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 11-23-2016 at 11:09 AM..
Reason: Added CODE tags.
hiyas
I am trying to get back to the root directory: I went into MAIL directory and now I can't get back to the root directory. What are the commands...
I have '?' coming up and I cannot proceed with this, HELP
Cheers (1 Reply)
I have a script(ex.sh) with one line in it, running in bash shell.
ls -l > /usr/ngasi/contexts/tdevoe/private/ex.txt
when I run it , it creates the file with a trailing question mark
-rwx------ 1 tdevoe webapp 59 Jun 7 06:42 ex.sh
-rw------- 1 tdevoe webapp 3761 Jun ... (3 Replies)
Hello everybody !!
I just started messing around with NAWK/AWK and I find it very interesting. I was trying to have script that prints only the the different lines (lines that are identical and adjacent, some that are identical and not adjacent, and some that are just different)
I tried... (6 Replies)
I am trying to write the following c code in nawk:
while ((ch = getc (fp)) != EOF)
{
total_bytes++;
checksum = (checksum >> 1) + ((checksum & 1) << 15);
checksum += ch;
checksum &= 0xffff; /* Keep it within bounds. */
}
I appreciate your help (10 Replies)
Hello to all
can any one help me out with a nawk script.
Actually i am having a shell script which uses nawk pattern searching
and it is not parsing the file properly.
I have been debugging it since long time, but nt able 2 find the root cause..
If any one can help me out with this one .. (3 Replies)
Dear All,
I am trying to run some commands and I am getting question mark in filename as output files.
Which is not a literal question mark however it is not standard output format for UNIX and it can not print it.
The output files are extended with ?
For example,... (2 Replies)
Hi all,
I'm trying to FTP what looks like a simple .txt file from my Windows XP desktop to my UNIX server. I've tried using several programs to do this including UltraEdit and FTP Commander. I have tried sending it ascii, binary and even let the program decide. But every time it arrives in UNIX... (4 Replies)
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)