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

    Split

    thanks for your input I managed to have the values separated by "|" e.g. my $values = (value1 | "value two" | value3 | "value four); - now I can process them properly. As Kevin states - one double-quote to much - end there is a mess Cheers - Dietmar
  2. dietmarp

    Split

    Hi, following situation I ran into - my $values=(value1 "value two" value3 "value four) How can I split to receive following result value1 value two value3 value four to be able to compute them. I had in my script my @lines = split(/ /,$values); foreach (@values){ .... } but this...
  3. dietmarp

    Compute Config file

    thanks Kevin
  4. dietmarp

    Compute Config file

    I run in a regex problem the regex from example above if (m/^\[(\w+)]/) { # Find Chapter names does not map lines with the - character in the name. e.g. [Chapter1] is mapped but [Chapter-2] or [Chapter-New-3] is not mapped. How doese the regex to be altered to map all lines starting with...
  5. dietmarp

    Compute Config file

    thanks
  6. dietmarp

    Compute Config file

    from example script and config aboth. I added following to retrieve the keys of the hash my @KEY = keys %config; print "@KEY\n"; The return is: #NodeGroupDefault CUSTOMER_GROUP Assignment_Windows Assignment_Linux Then I try to read the value of eg "Assignment_Windows" print...
  7. dietmarp

    Compute Config file

    Thanks - that does the trick. Though I am not familiar with hashes and ask for some further help to understand it. I know - that eg. the key Assignment_Linux contains Values Linux_a and Linux_b. How can I assess those values for further computing? Thanks - Dietmar...
  8. dietmarp

    Compute Config file

    Endusers shell be able to modify entries in the different chapters of the config file easy - thats why we thought to use this classic form of input config file
  9. dietmarp

    Compute Config file

    Hi, I have the need to compute a configuration file in order to perform certain tasks. The config file has different chapters. This is - how i started - but I am kind of stock. I thought to read the config file and store all different chapters in separate array - so I can compute them after -...
  10. dietmarp

    Policy (Logfile Template) distribution

    got it solved myself -- opcragt -distribute <hostname>
  11. dietmarp

    Policy (Logfile Template) distribution

    Hi, I generated a new Logfile Policy and loaded it using the opccfgupld command. I don't like to use the GUI. With which command can I distribute LogfilePolicies to certain nodes? Rgds - Dietmar
  12. dietmarp

    perl array print

    Thanks a lot for your help. Got it running.
  13. dietmarp

    perl array print

    Ups - to make it more clear, what result I'm looking for. I need to be able to process the generated lines of numbers. I thought, if I push the result to a new array, it would work. Here's the code. #!/usr/bin/perl -w use strict; my $ERRFILE = "d:/errorcode.lst"; my $ERROR; my $i; my @list...
  14. dietmarp

    perl array print

    Hi - thanks, that works. One more question. Is it possible to put the lines generated into an array, so I can use them for further processing. I tried while (<DATA>) { push(@errorcode, $1, (++$i % 5 and not eof ) ? "|" : "\n" if /errorcode=(\d+)$/); } and receive following error: syntax...
  15. dietmarp

    perl array print

    Thanks for the responses. Stevexxf, when I run your code it produces following output: 101|222|333|444|555 666|777|888|999|000 123|234|567|890|987 342|478| How would I get rid of the last | . I must not have lines ending with a | . Rgds - Dietmar
  16. dietmarp

    perl array print

    Hi, I've run into following problem. I need to process a list, and print every 5 errorcodes in one row and all errorcodes separated by a |. This is the list. ############## #errorcode.lst ############## errorcode=101 errorcode=222 errorcode=333 errorcode=444 errorcode=555 errorcode=666...
  17. dietmarp

    Tool &quot;regex-coach&quot;

    Hi, I found a tool to help visualize/create perl regular expression. It is freeware for private non commercial use and is available to download for Linux and Windows OS. http://weitz.de/regex-coach/ Dietmar
  18. dietmarp

    regex extracting string

    The line I'm matching is not perl code. It's from a file which is used by a logfile parsing tool (from IBM Tivoli) containing defintions. (which logfile entries should be found and what messages should be send to a central console - as info for the system admins). For documentation purpose I...
  19. dietmarp

    regex extracting string

    Hi Kevin, your regex works, if you put the backslashes in front of the quotes. #!/usr/bin/perl my $line = "msg PRINTF(\"syslogd: %s: No space left on device\", logfile)"; my ($new) = $line =~ /"([^"]+)"/; print $new; syslogd: %s: No space left on device But without the quotes (as my original...
  20. dietmarp

    regex extracting string

    Tony - thanks a lot. Kind regards - Dietmar

Part and Inventory Search

Back
Top