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

  1. schocku

    ps option to list all child processes...

    I have a main.ksh that executes a perl script and which in turn spawns child ksh processes and awk scripts. I have main.ksh in crontab to run every 10 mins. Is there a way to make sure that neither an earlier version of main.ksh or ANY OF ITS CHILD PROCESSES are running when crontab starts...
  2. schocku

    parse file and delete field

    I have a new requirment now. I want to be able to strip multiple columns from the flat file using awk. So it could be column 3 and 5 in the above example. If i pass the variable fld2delete with the value "3,5" would I be able to strip it within the awk program. The other...
  3. schocku

    parse file and delete field

    Ygor, Sorry about that. It works fine for files with small number of columns. I had a file with 49 columns in it and I was trying to delete the 49th column and was unable to do it. I read in the sed man pages that sed cannot edit very long lines. Is sed reliable for long lines and how long...
  4. schocku

    parse file and delete field

    Ygor, I used your solution in my application for stripping a column and it worked fine. However if you have a blank column in between it does not strip successfully. For example in the below data : 10/17/2003^F^444444^F^11^F^^F^1333^F^09-15-2003^R^ If I want to strip column 1 it gets...
  5. schocku

    merge question

    Sorry for the late reply. I will try it and let you know. Thanks for your responses.
  6. schocku

    merge question

    PHV, I tried your solution and ran into a few problems ... * the uniq file has only the last row in the input file and * the dups has all the rows including duplicates. Can you please explain your script?? Thanks for your help.
  7. schocku

    merge question

    I have a text file with contents as follows that will be loaded into a database table: 600193439^_600076830^_600193439^_2^^ 600193430^_600076827^_600193430^_6^^ 600192222^_600076830^_600191112^_2^^ 600333333^_600076830^_600193111^_2^^ ... ... The table has columns 2 and 4 as the primary keys...
  8. schocku

    compress tar question

    Thanks that works.
  9. schocku

    compress tar question

    Simple question... * I have a a.tar.Z compressed file in directory A. * I want to uncompress and untar the files in a.tar.Z and put them in directory B. Is there a more efficient way than doing it in 3 steps... - cp A/a.tar.Z B/. - uncompress B/a.tar.Z - tar -xvf B/a.tar Thanks for your help.
  10. schocku

    parse file and delete field

    Thanks to both vgersh99 and Ygor. Both your solutions worked great.
  11. schocku

    parse file and delete field

    I got an answer to this from the AWK forum. Thanks.
  12. schocku

    parse file and delete field

    vgersh99, Thanks for your quick response. I changed the FS to be "\\^F\\^" and OFS to be "^F^" in your script and tried it. It worked very well, except for the last column. For example when I specified the fld2delete=5 it did not delete the 5th field from the sample...
  13. schocku

    parse file and delete field

    Hi everybody, I have a file (a.dat) with the following data in it : 10/17/2003^F^555555^F^333^F^HELLO^F^04-15-2003^R^ 10/17/2003^F^444444^F^11^F^^F^09-15-2003^R^ 10/17/2003^F^555555^F^333^F^WATER^F^04-15-2003^R^ 10/17/2003^F^^F^333^F^FIRE^F^04-15-2003^R^...
  14. schocku

    parse file and delete field

    Hi everybody, I have a file (a.dat) with the following data in it : 10/17/2003^F^555555^F^333^F^HELLO^F^04-15-2003^R^ 10/17/2003^F^444444^F^11^F^^F^09-15-2003^R^ 10/17/2003^F^555555^F^333^F^WATER^F^04-15-2003^R^ 10/17/2003^F^^F^333^F^FIRE^F^04-15-2003^R^...
  15. schocku

    pass variable to next page

    thanks for both your help guys. I used adam's solution since I had a for loop and had to pass the value of the variable for that iteration on click of the edit button.
  16. schocku

    pass variable to next page

    I have a button and everytime the button is clicked I need to pass a string variable to the next jsp page. Can you please help me with a script for this : <INPUT type=&quot;button&quot; value=&quot;Edit&quot; onClick=&quot;????&quot;> Thanks for you help in advance.
  17. schocku

    search pattern and get line 46 before its occurance

    CaKiwi, My problem is solved. Thanks for your prompt response.
  18. schocku

    search pattern and get line 46 before its occurance

    CaKiwi thanks for your response. The script worked perfectly. An additional question. Instead of printing the 46th line before the pattern, can I search for the word &quot;Case:&quot; before the pattern 124304 and print that line. So if the file is as below ======== 06/18/2003 12:00:00:008...
  19. schocku

    search pattern and get line 46 before its occurance

    Hi all. I have a fixed format log file with content as follows : ======== 06/18/2003 12:00:00:008 blah blah 06/18/2003 12:00:02:010 blah blah .. .. .. 06/18/2003 12:00:00:016 blah blah 06/18/2003 12:00:03:020 submission 124304 .. .. 06/18/2003 12:00:04:200 blah blah 06/18/2003 12:00:05:020...
  20. schocku

    insert characters in each line of a file.

    Thanks for your help guys.

Part and Inventory Search

Back
Top