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

    Solaris 9 Certification

    Hi, I have over 3 years experience on the Solaris O/S, not a lot I agree, but I wish to try for Certification. Has anyone any tips on how to best do this; Should I set up a machine at home and install Solaris 9 on this, as a sandbox, or can the exam be done on a purely theoretical basis? I...
  2. SpongeBob1

    new question - awk

    If I could get something to start with, I'd hope to take it from there.... I'm still learning this stuff & am not to good with loops & stuff yet.... L.
  3. SpongeBob1

    getline question

    I get you Vlad, so pipe to something & use getline to read them back in again? Or an array - that much I can do - the backreferencing I will have problems with, and tips for starting this?
  4. SpongeBob1

    getline question

    Hi, How can I modify the following to go backwards in a file, as opposed to forwards? skip = 7 for (i=1; i < lines2skip; i++){ getline; print SB
  5. SpongeBob1

    getline question

    Thanks CaKiwi, One more question; If I am not using the getline function and am just using eg. if ($0 ~ /error/ ) I believe this sets my next usage of $0 to the line containing error; how do I escape this /avoid this & next time I use $0 use the entire ( original )file...
  6. SpongeBob1

    getline question

    This question concerns getlinel; My understanding of getline is that once it is used; the new value of $0 is used in testing against the patterns of any subsequent rules, may this e prevented & if so how?
  7. SpongeBob1

    Variable question

    flogrr, Thanks for your help, I've figured that much out, but what I'm trying to do is a little different & I should have elaborated.... this is my code test = $1 print &quot;THIS IS TEST&quot; test where = match($0, &quot;test&quot;) It's pretty simple, but I'm assigning the variable...
  8. SpongeBob1

    hi, If I have a command in awk s

    hi, If I have a command in awk such as; awk '/error/ { print $7}' errorlog.log This will give me a list of all the $7 variables in the line containing 'error', now what if I wish to use the $7 variable to test the file again ( errorlog.log ), using this $7 as the input value i.e. awk '/$7/ {...
  9. SpongeBob1

    awk pattern matching

    Hi, The log file I'm working with appears as follows; [07/Oct/2002: 12:01:03] uid : 'kelly' [07/Oct/2002: 12:01:03] Login from server 'qa1sa' [07/Oct/2002: 12:01:03] IP > 100 : &quot;101.101.101.101&quot; [07/Oct/2002: 12:01:04] result : 'kelly' Failed. This is an excerpt..... Basically...
  10. SpongeBob1

    awk pattern matching

    OK I can see where you're coming from... apoligies, firstly the for was for tesing purposes.... so in reality I am using; /uid:/ { split ($0, a, &quot; &quot;) print a[6] } The pattern /uid/ filters out all of the uids in the log.file ( this is a really big file); so I get a list of names...
  11. SpongeBob1

    awk pattern matching

    I'm running it as... awk -f awkscript log The input is completely semented... Basically I wish to get one value like i'm doing in the part; /uid:/ { for (i=1; i < NF; ++i); split ($0, a, &quot; &quot;) print a[6] } Then I wish to use the value in this array a[6] to cross reference another...
  12. SpongeBob1

    awk pattern matching

    This is what I am testing to do this /patten1/ { for (i=1; i < NF; ++i); split ($0, a, &quot; &quot;) print a[6] } The next step here is to do another pattern search to find a new value, but when modify script to be something like /patten1/ { for (i=1; i < NF; ++i); split ($0, a, &quot...
  13. SpongeBob1

    awk pattern matching

    Hi, I need to use several pattern matches such as /pattern/ in my script, however it seems that when i do the first one, the write some awk statements, then open the second one, I get an error, how is it possible to use several patterns? ps. I am able to do; /pattern1/ { print } /patern2/...
  14. SpongeBob1

    using &gt;

    Thank you CaKiwi, much appreciated....
  15. SpongeBob1

    using &gt;

    Hi all, I wish to write an awk script however for now all I need to do is get the line with the following character - it occurs often... the line is 200 > 120 however awk does not allow me use /200 > 120/ or /200 && 120/ do not work.... anyone have any ideas how to get these lines out?
  16. SpongeBob1

    awk file seperator

    Thanks for your help Ed.... I'm using FS =' ' It did not need the double quotes.... thanks. Bob
  17. SpongeBob1

    awk file seperator

    Hi Ed. Sorry my question is unclear.... what I wish to do is use the single quotation as my file seperator, or rather use two single quotations i.e. ' ' as the file seperator, this however I am having problems with as I believe awk interprets a single guotation mark as the end of script...
  18. SpongeBob1

    awk file seperator

    Hi Olden, Actually I meant... if (FS == &quot;' '&quot;) the ' character is what i wish to seperate by as opposed to &quot;... i think that awk interprets it as the end of the awk statement though, & am wondering how to avoid this....
  19. SpongeBob1

    awk file seperator

    Hi, I wish to use the following as a file seperator if (FS == &quot;''&quot; ) however I believe that awk has problems with the '' - does anybody know how to correct this error?
  20. SpongeBob1

    loop

    hi, Is there any way in unix ( ksh ) to do pattern matching? eg. in my script I want to pick out the ID's from a log file so I'm thinking something like.... searching for id=*, pick this from my log file & print it... any ideas? Thanks. D.

Part and Inventory Search

Back
Top