Wow Klashxx!! That code of your was spectacular !!
And thanks for the comprehensive explanation.
I have definitely learnt alot out of this.
Just a couple of question:
1) If the character to be displayed sometimes contain a maximum of 2 characters (number of characters will not exceed 2), how can you modify your code to suit this requirement ?
EG:
0101 AA
0102 B
0103 CD
0104 D
0201 EG
0202 F
0203 G
0204 HH
2) If the coordinates is not displayed in the input file , eg 0202 is not provided here, can you allow your code to print a minus character " - " when this situation arise.
Jus a question, what's the purpose of adding the " +0 " at the end of the codes. Is x and y arrays now ?
x=substr($1,1,2)+0
y=substr($1,3)+0
What if no " +0 " is added ? What will happen ?
You need it to force the conversion of the string that results of the substr function to a integer.
From The AWK Manual - Data Type Summary:
"The awk language defines comparisons as being done numerically if both operands are numeric, or if one is numeric and the other is a numeric string. Otherwise one or both operands are converted to strings and a string comparison is performed"
Hi All
I have multiple arrays like below.
set -A val1 1 2 4 5
set -A val2 a b c d
.
.
.
Now i would like to pass the individual arrays one by one to a function and display/ do some action.
Note : I am using ksh
Can you please advise any solution...
Thanks in advance. (7 Replies)
Hi
I want to write a script which store all the parameters passed to the script into an array.
Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD.
I want to know how can I... (3 Replies)
I have a file with one or two lengthy lines like....
masterUserID = 'S' OR masterUserID = 'S' OR masterUserID = 'S' (many many more times)
How do I display only the first few hundred characters from each line. (1 Reply)
I don't know if this is the correct thread to post. If not tell me please.
I have a script to make some queries to a Spanish Dictionay (Real Academia Española) as follows:
lynx -dump --nolist "buscon.rae.es/draeI/SrvltGUIBusUsual?TIPO_ HTML=2&LEMA="$1
It works this way:
./rae word
... (1 Reply)
Hi i have just registered
So i am at university studying forensic computing and we have to learn c++
i have never done anything with c++ before and i am abit stuck
i need to create a programme to display the contents of an array of characters forwards and in reverse
Can anyone help me... (1 Reply)
Hi,
I wish to store $string1 in $string1array a character in each array element.
Then i wish to echo the entire array to the screen so that it reads as the normal string again.
I have been trying with the code below but does not work. Please help...
To put string into array:
... (5 Replies)
I have a file that evidently has some special characters in it. Is there a Unix command that I can use tp display the file so I can see the octal or hex values? (2 Replies)
:confused:
I recently left managment and came back to AIX administration. So I am a bit rusty to say the least. The issue I am having is with the term settings when I either simply telnet to my AIX unit or even when I use an emulator like puTTY or a VAR provided one. Once I am logged into... (0 Replies)
Hi,
Does anybody have a command to share that will display EBCDIC files as character?
I have od -x -A d
which will display hex as follows
f0f1 f4f3 f0f0 f0f0 f0f6 f1f4 f6f3 f3f0
f3f9 f8f3 f1f6 f8f2 f860 d1e4 d360 f2f0
f0f5 4000 0000 5014 8c00 0000 0000 0c00
0000 0000 0d00 0000 5014 8c00... (1 Reply)