Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. arunrr

    output only unique lines, no duplicates

    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
  2. arunrr

    output only unique lines, no duplicates

    Hi Feherke, Thanks! That works great!! Arun
  3. arunrr

    output only unique lines, no duplicates

    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...
  4. arunrr

    grep file for strings in multiple lines in external file

    Thanks a lot! Tried both, they work great. Arun
  5. arunrr

    grep file for strings in multiple lines in external file

    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...
  6. arunrr

    Combining 2 files - add (some fields), use larger number, etc.

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

    Combining 2 files - add (some fields), use larger number, etc.

    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...
  8. arunrr

    Combining 2 files - add (some fields), use larger number, etc.

    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...
  9. arunrr

    Insert duplicate field - repeat in long string

    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
  10. arunrr

    Insert duplicate field - repeat in long string

    Hello, I have the following input... (continuous line; Field Separator=,)...
  11. arunrr

    Passing variable to PHP from Javascript

    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...
  12. arunrr

    Passing variable to PHP from Javascript

    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...
  13. arunrr

    Passing variable to PHP from Javascript

    Thanks Phil, working on changes... Arun
  14. arunrr

    Passing variable to PHP from Javascript

    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...
  15. arunrr

    Date sort - 4 fields

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

    Date sort - 4 fields

    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
  17. arunrr

    appending line with characters

    Feherke, IPGuru, Thanks for the all the advice. Will apply... Arun
  18. arunrr

    appending line with characters

    Hi, This is done. Used the following... cat input | sed '/^$/d' | awk '{if (NF<7) for(i=NF;i<7;i++) $0=$0" X"; printf $0"\n"}' Thanks AR
  19. arunrr

    appending line with characters

    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
  20. arunrr

    appending line with characters

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

Part and Inventory Search

Back
Top