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 SkipVought 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. AlbertAguirre

    parse file AND parse column with diff delimiter

    Ok I need to parse a file but ALSO parse one of the columns in the file. The file is delimited by | but the column I am parsing is delimited by '/' Here is a sample record from the original file: 2008-08-28...
  2. AlbertAguirre

    lose varfiable setting in loop

    I am indeed using bash. Can I make it a ksh (#!/bin/ksh) and have it work? I tried that but no success Ideas anyone?
  3. AlbertAguirre

    lose varfiable setting in loop

    # i set my variable here thisvar="abc" echo $thisvar # i go into my loop here and reset the variable ls -l | while IFS=":" read f1 f2 do thisvar="xyz" done # display the supposed reset variable here echo $thisvar The result should be xyz but it remains abc Why??? How can...
  4. AlbertAguirre

    Parse output with bash script and awk

    olded That works if theres a file involved (myfile.txt). But theres no file. The output is coming from a linux command. Can your snippet be modified top handle that? -A
  5. AlbertAguirre

    Parse output with bash script and awk

    My command returns this: Libsmbios: 0.8.0 System ID: 0x01B2 Service Tag: D*****1 Product Name: PowerEdge 2950 BIOS Version: 2.1.1 Vendor: Dell Inc. Is Dell: 1 I need to loop through each row and move the value left of the ":" to one variable and the value to the right of the...
  6. AlbertAguirre

    How do I add an element to array??

    Wow! Makes sense. Thank you!
  7. AlbertAguirre

    How do I add an element to array??

    Figured it out: # CREATE ARRAY arEquipment=(albert danielle daniel); # APPEND TO IT arEquipment=(${arEquipment} nathan); Is there another way?
  8. AlbertAguirre

    How do I add an element to array??

    I just want to add to the end of an array. How is this done??? Seems so simple... Heres my array: arEquipment=(albert danielle daniel); I would like to add element 'nathan' to the end. How?
  9. AlbertAguirre

    Cant copy files from vista to xp over network

    I cant copy files from a vista laptop to my xp desktop. I CAN see my desktop but I get 'you dont have permission to perform this action' when I try to paste a file onto the xp desktop. I created a login on the xp desktop that matches the vista laptop, login and password. On the xp machine I...
  10. AlbertAguirre

    file_put_contents, file lock AND append?

    I am using the file_put_contents with the append option. Code: file_put_contents("filename", "text to write", FILE_APPEND); Problem is that I want to lock the file as well as append. Php documentation says to use the "LOCK_EX" flag, however, it does not have examples. How do I pass BOTH the...
  11. AlbertAguirre

    newbie: failing IF statement

    OK. after hours of searching i found the "eq" This works. $setType="raise"; if ($setType eq "lower"){ print "in if \n"; }else{ print "in else \n"; } in else Sorry to trouble you!
  12. AlbertAguirre

    newbie: failing IF statement

    Why does this fail??? $setType="raise"; if ($setType=="lower"){ print "in if \n"; }else{ print "in else \n"; } The output is consitantly: in if Why???
  13. AlbertAguirre

    newbie: Multidimensional array

    Perfect! Thank you MillerH!
  14. AlbertAguirre

    newbie: Multidimensional array

    ok how do I append a value to one element of the array? CODE my @aTest = ( [ 'albert', 'daniel', 'nathan' ], [ 'danielle', 'mylee', 'rob' ], ); #I want to add 'paul' ot @aTest[0] foreach $row (@aTest){ foreach $col(@$row){ print "$col \n"; } print "----- $row[1] \n"; }...
  15. AlbertAguirre

    newbie: Multidimensional array

    ishnid thank you... MillerH, i scanned through the doc but it will take me hours to find what I need. I already understand multidimensional arrays, I just need to know the perl syntax for it. ishnid gave me the one character I needed "@" Thanx!
  16. AlbertAguirre

    newbie: Multidimensional array

    Ok well how do I create a nested loop to itterate through the values? (BTW I am a PHP guy...) # MY CODE my @aTest = ( [ 'albert', 'daniel', 'nathan' ], [ 'danielle', 'mylee', 'rob' ], ); # This does not work: foreach $row (@aTest){ foreach $col($row){ print "$col \n"; }...
  17. AlbertAguirre

    newbie: Multidimensional array

    Thank you both! You answered my questions!
  18. AlbertAguirre

    newbie: Multidimensional array

    This seems so simple but I dont understand it. I want to print ONE element of a multi dimensional array. Here are my base arrays: @aTemp1 = ('albert', 'daniel', 'nathan'); @aTemp2 = ('danielle', 'mylee', 'rob'); Here is my multidimensional array: @aTest = (@aTemp1, @aTemp2); I want to print...
  19. AlbertAguirre

    SIMPLE query question

    I am very new to perl. How do i execute an sql without preparing it first?? Sorry about the dumb question.
  20. AlbertAguirre

    But the login and password are correct!?!?!

    i did and it did work. I found the problem! after assigning the user permissions I needed to do a "flush privileges" That worked. Thank you anyway!

Part and Inventory Search

Back
Top