Your second code/sample set is far clearer and consistent:
Your code is reading
into variables (ln 2 & 3) using this format
(watch out - there's one space too many in cno and nop!), calculates decimal lat & long from ld, lm, lgd, lgm, each in degrees/seconds, and writes out the variables
using this format
producing this output line
which is identical to your sample output:
HOoooKay, here we go. There may be more elegant solutions possible, and the bells 'n whistles I leave up to you to implement, but at least you got sth to start with:
Last edited by RudiC; 01-30-2013 at 11:06 AM..
Reason: prelim solution found
More tedious than genius: If the input line starts with " 2.": count characters (using the FORTRAN format as a template) and assign to the header's partial variables (which you don't mandatorily need, you can use the substr()s immediately, except for time, lat, long) to compose the header. Then, for the next lines read, split them repeatedly into dstand/tstand pairs, outputting each pair together with the header variable.
Exercise for you: drop the function and compose header in the action part of /^ 2./, without using all the little variables.
hi
i have this file :
<?xml version="1.0" encoding="UTF-8"?>
<OnDemand xmlns="http://xsd.telecomitalia.it/Schema/crmws.entity.OnDemand"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xsd.telecomitalia.it/Schema/crmws.entity.OnDemand... (2 Replies)
I have received a file from a Windows server that in Linux hexedit shows the following first few characters.
AA 18 3C 2B 60 56 03 00 00 01 01 00
The Windows program may have received this via RS232.
I need to "understand" this on a Linux machine.
Please suggest where I may start decoding... (4 Replies)
Hello,
I have an encoded file and I wish to see what is written inside.
The first line is given below:
eval "$(dd if=$0 bs=1 skip=69 2>/dev/null|gpg -d 2>/dev/null)"; exit
PS: When I google above code, it says that command is use for encryption...
Following lines include many strange... (2 Replies)
I have a file type of: executable (RISC System/6000 V3.1) or obj module not stripped
How can I decode it? I know that this may be somewhat involved, but if you could steer me in the right direction, I would appreciate it. Thanks! (2 Replies)
Hi,
How to decode an image using openGL library libjpeg ..
which are the steps needed to do this using C language..
actually my work is to decode the image, store it on the buffer,
and place it on cube surface..
please guide me,,any answer will appreciated .. (8 Replies)
Hi,
I am having a file in below stucture:
header
{
subheader1
{
field1 : value
field2 : value
field3: value
} //end of subheader1
subheader2
{
subheader3
{
field4 : value
field5 : value
field6: value
}
subheader4 (6 Replies)
Okay,
This is not something I've tried to do before, but what I want (need) to do is when a value is read in it gets changed to the value needed.
I've been given a list of ids that I need to check against the ids I have in my system, but as is the case we don't have the same naming convention... (2 Replies)
In pine email, when you receive an email with an attachment, the content of the attachment is incoded (content-transfer-encoding: base64). I am trying to write a shell script that will read the mail file, and it will save the attachment of an email to a directory.
I want to do this by reading... (6 Replies)
Hello: Can anyone please decode this script in English. I have also made some comments which I know.. The actual script does not have one comment also..
#! /bin/ksh
. odbmsprd_env.ksh #setting the env..
echo $0 Started at : `date '+%d-%m-%Y %H:%M:%S'`
# what's echo $0
... (4 Replies)