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 \
>...
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.