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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by AlbertAguirre

  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!

Part and Inventory Search

Back
Top