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

  • Users: Geek8
  • Order by date
  1. Geek8

    Problem with Blank spaces when using the Unpack Function.

    Just a few quick questions for you Jim. 1. In this statement "foreach my $search ( @SEARCH )", Does the statement dynamically create an "internal" array that it then uses to reference? I am not sure of the process here so I would like to know if you get a moment. 2. In the following statment...
  2. Geek8

    Problem with Blank spaces when using the Unpack Function.

    That was it! Thanks for all your help on that Jim. I really appreciate it. I hope through practice I'll be able to return the favour someday. Thanks again. Geek.
  3. Geek8

    Problem with Blank spaces when using the Unpack Function.

    Jim, I noticed that if I put the following print statement after the unpack function: print "$names\t"; I get a page full of the second unpack variable. The records in this are all without the trailing blanks. Wouldn't that mean that Unpack is doing that? Geek.
  4. Geek8

    Problem with Blank spaces when using the Unpack Function.

    Jim, Thanks for that code change. It is so small and easy with what you have done. I tried it out and still am having the same problem. The values I want erased are going away, but when I print the record back out, the 2nd upack function "names" is dropping the blanks off the end of that...
  5. Geek8

    Problem with Blank spaces when using the Unpack Function.

    That code upgrade is great. Thanks for making it a lot more concise. I am pretty new to Perl as I am sure you can tell, but this helps a lot to learn. I know I need to learn "hashing" but basically the contents of the search and replace arrays are the following: Search is: my @SEARCH = ("...
  6. Geek8

    Problem with Blank spaces when using the Unpack Function.

    Thanks Jim for your quick response. Here is the code I am using. Actually in my previous post I made a mistake and said the "end" has the blanks, but the blanks are actually in the "names" record. Could it be the actual search and replace that is causing the blanks to vanish? If you have any...
  7. Geek8

    Problem with Blank spaces when using the Unpack Function.

    The problem I am having with the UNPACK function is the following: I am currently unpacking a record of 220 bytes into 3 variables. The first is to be left untouched, the second has some search and replace stuff going on in it, and the third is untouched. When I print out the results after...
  8. Geek8

    Creating a sort of "loop" with cron.

    Hi. The subject may be a bit odd, but what I want to do is create a cron job that will run every evening on the hour from 7pm till 2am. The job will go out and get a file from our server and check this file against counts that already exist on our current machine. If the file matches the...
  9. Geek8

    Not understanding values returned when "ctrl g" a file using VI.

    This is a pretty simple question, but one that I can't seem to find a quick answer for. So I thought maybe someone on this board might be able to help me out. Basically I am using VI to look at a file with 10 records in it. With my cursor on the last character of the record, I hit the...
  10. Geek8

    SFTP from within a shell script

    Thanks, I might try both methods out and see where I get. I will keep you updated. Thanks again, GEEK
  11. Geek8

    SFTP from within a shell script

    Hi, I am trying to figure out how I can successfully SFTP a file from within a shell script. Currently we do a few things with FTP within a shell script, but we are in the process of changing this. Can someone point me to a good way that I might be able to do the same thing with SFTP...
  12. Geek8

    Negative answers for multiplication in K Shell.

    Vlad, Thanks for the support. I don't know why I am getting the negative with the first way, but when I try the alternative way you mentioned, it worked fine. What does it mean when you pipe it to "bc". I understand it has to do with arithmetic conversions, but I don't fully...
  13. Geek8

    Negative answers for multiplication in K Shell.

    Hello, I am currently writing a script to print a report after collecting a bunch of information on our servers. The report is looking fine except for 1 thing. There are about 3 spots on the report that the number comes out negative. I tried running the command on the command line and I still...
  14. Geek8

    Correct Use of Length Function

    OH....yeah. That makes sense. Thanks for your help and direction. I really appreciate that.
  15. Geek8

    Correct Use of Length Function

    There are 8 records with that character length. The "\n" is the 1313th character. Is this the problem? The file is a Text file and also I am working on Linux, but have not tried it on Windows. Geek.
  16. Geek8

    Correct Use of Length Function

    Hello, I am trying to use the length function to determine the length of the input string and then print it if it is 1313 long. Else just skip it. This is what I have so far. I am not sure what I am doing wrong. Any help would be great. #!/bin/ksh/perl -w use strict; ##Open file for...
  17. Geek8

    How do I push a lines value into the first position of an array?

    Great! Thanks. It works like a charm.
  18. Geek8

    How do I push a lines value into the first position of an array?

    I am trying to open a file and then access each line and then enter that line into the "n"th position of an array. I am not sure how to do this. I am pretty new to perl, and would love some help. Here is my small code snippet. What could I do so I can take the undefined length of...
  19. Geek8

    Check for Blanks

    Thanks Paul. That helped. I think I have it working now. Geek

Part and Inventory Search

Back
Top