mrn,
Thanks for your post. I cant sort as I need to maintain the order, meaning the first occurrence of a string must remain in its original position.
PH,
Your 'awk' statement works great. Appreciate it!
Thanks,
Arun
Hello, I have the following input file.
Sri Lanka v Pakistan
England v West Indies
Sri Lanka v Pakistan
West Indies A v India A
England v West Indies
West Indies A v India A
England v West Indies
West Indies A v India A
Sri Lanka v Pakistan
England v West Indies
West Indies A v India A
Sri...
Hello,
Here is file1...
Fri Feb 17 2012, 03:20 GMT 14:20 Local, Australia v Sri Lanka,Sydney, Commonwealth Bank Series
Fri Feb 17 2012, 06:00 GMT 19:00 Local, New Zealand v South Africa,Wellington, 1st T20I
Sat Feb 18 2012, 11:00 GMT 15:00 Local, England v Pakistan,Dubai (DSC), 3rd ODI
Sat Feb...
This is done, albeit not as I originally intended...
http://www.bcci.com/ -> Records -> Batting: ALL
Year range ($2) and handling of "*" needs work.
Thanks
AR
Thanks for the tip! :-)
File1 is really about 60 lines and File2 about 80 lines. I extracted only the names that were in both file and came up with 38 names. Note this is a change from the initial request. Then,
> resultfile
while read NAME
do
grep -h "$NAME" File1 File2 | awk...
Hello,
I need to combine File1 and File2 to result in File3...
File1:
SR Tendulkar,1989-2011,453,18111,200*,48,95,20
RT Ponting,1995-2011,370,13686,164,30,82,20
ST Jayasuriya,1989-2011,445,13430,189,28,68,34
Inzamam-ul-Haq,1991-2007,378,11739,137*,10,83,20
JH...
Thanks for the input. Works great...
However, I do need to take this beyond i=21, i.e., 34, 47, 60, 73, etc.
Basically, it would be i=(8 + (13 * x)), where x=0,1,2,3,4,5,etc.
A quick tip on how to set this up within the awk statement would be awesome.
Thanks
Hello Phil,
Thanks for your input. Got things working with the following...
I have the following javascript code...
document.getElementById('BATS').value = Batsmen;
and the following input html tag...
<input id="BATS" type="hidden" name="userchoice">
and the following MySQL insert via PHP...
Hello,
Continuing the above effort, the full code may be seen at...
http://www.bcci.com/Poll/best_test_batsmen/btb.txt
The polling site is...
http://www.bcci.com/Poll/best_test_batsmen/btb.php
The javascript variable, 'Batsman', is a string and will have a default value of:
"A B C D E F G H...
Hello,
I am putting together the following rank polling for my site...
http://www.bcci.com/Poll/best_test_batsmen/btb.php
The entire code may be viewed here...
http://www.bcci.com/Poll/best_test_batsmen/btb.txt
The following method to assign the value of the javascript variable to PHP...
Thanks Annihilannic for the input...
I came up with the following, which also converts to numeric and then back to the date format after sort.
cat inputfile | \
while read DD; do echo $(date -d "$DD" +%s); done | \
sort -n | \
while read DD; do echo $(date -d @"$DD" +"%a %b %d %Y"); done \
>...
Hello,
Looking for the sort command to sort by date using the following input...
Sun Jan 29 2012
Sun Jan 29 2012
Thu Jan 19 2012
Fri Sep 23 2011
Sat Dec 3 2011
Fri Sep 30 2011
Mon Sep 19 2011
Fri Nov 4 2011
Mon Sep 19 2011
Sat Sep 17 2011
Sat Sep 24 2011
Thanks,
AR
Sat Sep 24 2011
Thanks for your reply. I am building an interactive cricket calendar. Here is a template...
http://http://www.bcci.com/Schedules/Cal.html
The cells where there is no date ('X') is shaded as shown.
Thanks,
Arun
Hello,
I have the following input file...
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
Basically it is a monthly calendar (June 2011). I need to fill the blanks with 'X', meaning...
X X X 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.