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

    Terminate Unix script after 12 hours

    How do I write a script to terminate in 10 hours if a file is not found. The script has to check for a file, if file not found go to sleep for 1 hour, check again....sleep.... If file not found even after 12 hours, then exit with error thanks for your help
  2. zen2003

    Awk and Pattern Match

    fold does not work as the record may be a variable lenght. What I am trying to do is insert a newline before 'UNH' This substitution works sed 's/UNH/*!!@UNH/' contrl0.txt What I want to do is sed 's/UNH/geta newline char hereUNH/' contrl0.txt I tried sed 's/UNH/\\nUNH/' contrl0.txt and a few...
  3. zen2003

    Awk and Pattern Match

    Nope, Can not get to either. I think I am hitting the awk's limits that are RECORD-based.If I reduce the amount of text then it works fine. Any ideas of how I can workaround this limit?
  4. zen2003

    Awk and Pattern Match

    It does not come back with anything: $ awk -f a5.awk contrl0.txt + awk -f a5.awk contrl0.txt $ a5.awk is: $ cat a5.awk + cat a5.awk BEGIN { RE=&quot;UNH.*&quot; RS=FS=&quot;UNT&quot; } { for(i=1;i<= NF;i++) if (match($i, RE)) printf...
  5. zen2003

    Awk and Pattern Match

    I am using HP-UNIX 11
  6. zen2003

    Awk and Pattern Match

    No its not Oracle related. I am executing: awk -f a4.awk contrl0.txt a4.awk is: BEGIN { RE=&quot;UNH.*&quot; FS=&quot;UNT&quot; } { for(i=1; i <= NF; i++) { if (match($i, RE)) print substr($i, RSTART) FS ; }...
  7. zen2003

    Awk and Pattern Match

    vlad help!!! Now if the line is big I get an error: Input line UNA:+.? 'UNB+UNOA:3+ cannot be longer than 3,000 bytes. How to solve this?
  8. zen2003

    Call sqlplus form unix

    I am calling a sqlplus script from a shell script. I get an error on the size of the string I am passing as a parameter. Can someone help me on how I can solve this. Error is: string beginning &quot;UNH+000000...&quot; is too long. maximum size is 239 characters. Line that gives error...
  9. zen2003

    Awk and Pattern Match

    Thanks a lot it works now
  10. zen2003

    Awk and Pattern Match

    I get error $ new1 new1: syntax error at line 5 : `done' unexpected File new1 is: #!/bin/ksh nawk -f zen.awk zen.txt | while read theLine do echo &quot;here is my line to process->[${theLine}]&quot; done file zen.awk is: BEGIN { RE=&quot;UNH.*&quot; FS=&quot;UNT&quot; } {...
  11. zen2003

    Awk and Pattern Match

    What I need to do is take each line and further process it. Is it possible to assign print substr($i, RSTART) FS to a variable and then do the futher processing to this variable using a unix script?
  12. zen2003

    Awk and Pattern Match

    Thanks a lot. it works
  13. zen2003

    Awk and Pattern Match

    How do I write the print output to a file? I tried print substr($i, RSTART, RLENGTH+100) >> aaa.txt but I get an error: syntax error The source line is 9. The error context is print substr($i, RSTART, RLENGTH+100) >> awk: The statement cannot be...
  14. zen2003

    Awk and Pattern Match

    It only returns a part of the string. The result should have been UNH+00000000012689+BTS:D:96A:UN'BGM+XZ8+1'DTM+137:20030718:102'LIN+1'RFF+XC3:F2003-07-18-06.00.47.168473'RFF+AEK:03071806000002'RFF+CR:EXM 1000735AT1ZD'SE Q++1'GIS+1'UNT but what I get is...
  15. zen2003

    Awk and Pattern Match

    Its a continous block of text
  16. zen2003

    Awk and Pattern Match

    Thanks for you help. I tried it and does not return anything; What am I doing wrong. $ awk '/^UNH.*UNT$/{print}' file1.txt $
  17. zen2003

    Awk and Pattern Match

    This is my data file: UNA:+.? 'UNB+UNOA:3+CHASE:ZZ+ADSD:ZZ+030718:0103+00000000000630'UNH+0000 0000000326+CRL:2:2:UN'UCI+47000618072003+EV1:ZZ+CH:ZZ+7'UNT+3+000 00000000326'UNZ+1+00000000000630' UNA:+...

Part and Inventory Search

Back
Top