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 strongm 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: *

  • Users: frangac
  • Order by date
  1. frangac

    ARGC question

    Hi Annihilannic Thanks. That should give me a start. Thanks Again Chris
  2. frangac

    ARGC question

    Annihilannic, Thanks for your response. I would like my script to be fully awk (Chris) for e.g. Chris NE DT 20061105 20061106 and must read BEGIN{for (i=1;i<ARGC;i++){ if(ARGV[i] != 4){ exit 1 } else { if($1!=NE){ print something exit 2 } if($2!=DT){ print something exit 3...
  3. frangac

    ARGC question

    Hi All, Can I use a for loop to read the ARGC input parameters instead of me using ksh to do this for e.g. Chris.sh NE DT 20061105 20061106 and must read BEGIN{for (i=1;i<ARGC;i++){ if(ARGV[i] != 4){ exit 1 } else { $1=NE ,$2=DT etc.. } Many Thanks Chris
  4. frangac

    Print Line

    Hi All, PHV How can I print the getline statement from the following: awk -v opt=Restore_Chris -v PH='/raw_data/SB/repdir/Archive_Restore/' 'BEGIN{print "connect tcenh198 dsadmin \"\""} /MTA0000001/{print "compRead...
  5. frangac

    The while loop

    Hi All, I think I have solved my problem , the close(VOL) was missing Thanks Chris
  6. frangac

    The while loop

    Hi All, PHV Below is my script that reads the .ini file and if the start time is 12:00 is should them activate the instance which it does but due to the data base allready marked as active , it returns a "MESG" But when the next instance (conductor_DCAPS_E10_12) is read it does the system...
  7. frangac

    If pattern is not available, print a mesg

    Hi PHV, As always spot on. One question , may I borrow your brain for one year, I promise to return it in the same order.(just a joke) Many Thanks Chris
  8. frangac

    If pattern is not available, print a mesg

    Hi PHV,Feherke, Any ideas for me. Many Thanks Chris
  9. frangac

    If pattern is not available, print a mesg

    Hi Thanks once again. The result i am getting is incorrect A_NUM DATE/TIME B_NUM DURATION (0 rows affected) awk 'BEGIN {printf "%10s %25s %20s %15s\n","A_NUM","DATE/TIME", "B_NUM","DURATION"...
  10. frangac

    If pattern is not available, print a mesg

    Hi Feherke, Thanks a lot. With you code I get the following error syntax error The source line is 14. The error context is >>> END <<< { awk: The statement cannot be correctly parsed. CODE ==== awk 'BEGIN{printf "%10s %25s %20s %15s\n","A_NUM","DATE/TIME"...
  11. frangac

    If pattern is not available, print a mesg

    Hi Feherke, Thanks, but I have tried it awk 'BEGIN{printf "%10s %25s %20s %15s\n","A_NUM","DATE/TIME", "B_NUM","DURATION"} FNR==NR { t[$1]=$1; next } {if(t[$1]==$1){Flag=1}{ if($4=="0" && ($4!="[A-Z,a-z] || $4!=\"---")){ DUR=$4...
  12. frangac

    If pattern is not available, print a mesg

    Hi All, The problem that I am experiencing is when the pattern is not found in file2, print a mesg "0133333333 No Info Available". I have tried different ways but cannot seem to find a solution. My Code awk 'BEGIN{printf "%10s %25s %20s %15s\n","A_NUM","DATE/TIME", "B_NUM","DURATION"}...
  13. frangac

    System() with sprintf

    Hi All, I have a solution but seems to be like PHV would call it 'BRUTE' Da=`awk '{print $2" 00:00:00"}'` and then awk -v opt="/sybase_oc/OCS-12_0/bin/isql" -v opt2="'$Da'" ' { ....... ....... }' If any or better solution , please post Many Thanks Chris
  14. frangac

    System() with sprintf

    Hi PHV, Thanks once again. I did try you solution but this is what I get echo select A_NUM=nullif\(A_NUM,\" \"\) from CE.CDR_DRMS where R_DT=date\(2006/06/06\) and A_1=0 and A_2=1 and A_3=2 and A_4=3 and A_5=1 and A_6=1 and A_7=8 and A_8=8 and A_9=6 and A_10=isnull\(5,\"\"\) \\ngo |...
  15. frangac

    System() with sprintf

    Hi All, How can I call a sprintf command to read the following selcmd1=sprintf("%s","echo select A_NUM=nullif\(A_NUM,\\\" \\\"\) R_DT=date\('2006/06/06'\) "\\\\ngo | " opt) in other words the result must return like : echo select A_NUM=nullif\(A_NUM,\" \"\) where R_DT=date\('2006/06/06'\)...
  16. frangac

    Reading each number in array

    Hi PHV,Feherke Thanks. PHV's solution is perfect (as always, right). Feherke Your solution does work but does not assign to each array. Many Thanks Chris
  17. frangac

    Reading each number in array

    Hi Feherke, Thanks for your input but I dont get the results File ==== 0123456789 2006/06/06 awk '{ len=length=$1 dim=split($1,arr,"") for (i=1;i<=dim && i < len;i++) print i,":",arr[i] }' File Output should look like this arr0=0 arr1=1 arr2=2 etc.. What am I...
  18. frangac

    Reading each number in array

    Hi All, How can I do the following number = 0123456789 By using the for loop for (i=0;i<=length($1);++i) { assign each number to an arr } ' $1 and the result arr1=0 arr1=1 arr1=2 arr1=3 arr1=4 arr1=5 arr1=6 arr1=7 etc... Many Thanks Chris
  19. frangac

    Joining two values

    Hi Salem, I might be missing your point. When we first read the byte it is in char format "&" and when converted it is 26 and so this applies for the next byte "ac", so I cannot see how you would pass it as an int. Should I not convert it to hex or straight into int then only times it by 256...
  20. frangac

    Joining two values

    Hi Salem, The result I get with the above code is "17615506841761550684" which is incorrect. What am I doing wrong Thanks Again Chris

Part and Inventory Search

Back
Top