Not so clear. Can you have more or less than two countries on a server? Will it always be multiples of four entries per service? Can you have more than one service on a server?
And, last but not least: your TXT file does not match what you call the HTML file.
@RudiC:
Q:Can you have more or less than two countries on a server?
A: Yes it is possible to have more than just two
Q: Will it always be multiples of four entries per service?
A: Yes. Please see the detailed format on the below thread.
Q: Can you have more than one service on a server?
A: Yes. Lets say that the above example belongs to a MasterServer1. There can be a MasterServer2 with the same/different services.
Q: your TXT file does not match what you call the HTML file
A: Exactly, that is my problem. Because my script is reading each column on the HTML file and not each row. That is also a source of my problem.
Last edited by newkid.7955; 07-19-2013 at 06:14 AM..
In above sample, I see
a) one service per server
b) server and service always on one single line
c) two countries per server/service.
Please post a meaningful sample file to be worked upon with all kinds of server/service/data combinations. Not sure that MadeInGermany's proposal will work if a new service comes up for an already known server that itself does not show up in the same line.
This is quite different from what you posted in post #1. Where/what is the service, presented in post#1, missing in post #6? What is num, appearing suddenly in post #6? Where ist the country, and where is the 4-item-structure you confirmed in post #4?
Hi dears
i use bash shell
i have INPUT.txt
like this
number of columns different in one
some row have 12 , some 11 columns
see last column
INPUT.txt
CodeGender Age Grade Dialect Session Sentence Start End Length Phonemic Phonetic
63 M 27 BS/BA TEHRANI 3 4 298320 310050... (2 Replies)
Hi,
My input file
Gene1 1
Gene1 2
Gene1 3
Gene1 0
Gene2 0
Gene2 0
Gene2 4
Gene2 8
Gene3 9
Gene3 9
Gene4 0
Condition:
If the first column matches, then look in the second column. If there is a value of zero in the second column, then don't consider that record while averaging.
... (5 Replies)
Hello there, find below for my code first:
$pdp_asaba=`cat /tmp/temp_total | grep asaba | sed 's/*//g'`
if ]]
then pdp_asaba=0
fi
$pdp_abuja=`cat /tmp/temp_total | grep abuja | sed 's/*//g'`
if ]]
then pdp_abuja=0
fi
$pdp_ojota=`cat /tmp/temp_total | grep ojota | sed 's/*//g'`
if ... (3 Replies)
Hi,
I need my script to check if the user enters 3 values if not 5 values to my script and alert if the input has any other number of values.
for example:
./myscript.sh 22 56 3221 - > correct
./myscript.sh 22 56 3221 45 777 -> correct
./myscript.sh 22 56 3221 45 -> incorrect
Please... (6 Replies)
Hi,
I have a script which runs daily. It gets 3 input files test1,test2,test3. I want to do a validation in my script to make sure i have all the 3 files available before running. If any one of the file is missing i want to break the script.
Could you please help me with this request.
... (1 Reply)
Suppose we have a simple situation, like the following C++ instructions:
int x;
cout << "Insert x: ";
cin >> x;
while ( x-- < 0 ) ;
Of course, if it is written something different from an integer, the while loop shall not end.
So, how can we check if the input x is of the right type? (2 Replies)
Hi All,
I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
HI all,
I would like to know how the user can be restricted for entering only the number and not characters in sheel scripts..
Suppose code is like this
echo 'Enter the number'
read Value
Now user may enter 'a' as value...
But i want to disallow him for entering characters other than... (3 Replies)