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 bkrike 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: chris01010
  • Content: Threads
  • Order by date
  1. chris01010

    PERL loop problem

    I have written the below PERL script to reprocess messages from a failure queue. It basically browses all the messages in the failure queue to individual files in a directory and then scans those files to determine the originating queue. The script will then move each message in turn from...
  2. chris01010

    PERL - pressEnter function hanging

    Hi, I have a sub function called pressEnter within my perl menu script which basically means that the script will await an interaction from the user before moving on. Unfortunately when the script goes into pressEnter it just hangs (even if you press enter!!). Any ideas on what could...
  3. chris01010

    Runing a function from Case Statement

    Hi, I have the below script that should take the command line option and run the desired script on another server. Only it doesn't seem to run the function, infact it just returns back to the command line. case $1 in 1) msgbacklog() ;; 2) jobstatus() ;; esac...
  4. chris01010

    PERL - Using regular expression to manipulate text

    Hi, I have a PERL script which executes a script which interrogates a database on another server and produces an output file (an example of this is at the bottom). Of this file I only want a section of the data, from USER until the last number. I have written the code below but when run it...
  5. chris01010

    Perl - Help with a Menu script required

    Hi, I'm trying to wrtie a menu perl script which will allow users to connect to different servers from a management server without having to know the long server name. I have written the below code, but when I execute it I manage to get through the first 2 menus but it doesn't exit once...
  6. chris01010

    Selecting a substring from a column with another string as a reference

    Hi, I'm trying to select a substring within a column but using another string as the starting point. This is because the position of the string in the column may change. i.e. select substr(<column name>,<reference string>,3) from table; ABCDEFGHIJKLMNOPMSGNO123ABCDEFGHIJKL The refence...
  7. chris01010

    Quick query

    Just a quick question. What is the difference between executing a script command using ./usr/local/blah/blah/blah.ksh and /usr/local/blah/blah/blah.ksh Thanks Chris
  8. chris01010

    Ignoring delimiters when passing to variable

    Morning, i'm currently having trouble when passing a value into a variable from another file. I am currently using the below example: function Command { for command in `cat proclst.tmp` do set $command exec $command done } The line I am trying to pass has a space delimiter (and is...
  9. chris01010

    Variable in an IF statement

    Afternoon all, Trying to run an IF statement within a script in KSH. Basically I want it to check whether a variable has a value set or whether it is blank. I currently have the below, but needless to say it's not working. Can anyone spot where i'm going wrong? If [ $FILE != '' ] then...
  10. chris01010

    Problem with spacing in text out turn

    Hi guys, Just got the attached script to run, which basically sends an email to a recipitent when an error occurs, and unfortunately the output contains a space as below. Any ideas? Database reconciliation between Tandem and Unix has failed. Please see the attached file(s). You can...
  11. chris01010

    Problem with count in a loop

    When using a While flow, using an argument of count, the value of the variable $count is not incrementing but instead just displaying an output of 1+1+1.... i.e. Script: while [ $count -lt 10 ] do echo "$count" count=`expr $count+1` done Output: + [ 1 -lt 10 ] + echo 1 1 + + expr 1+1...
  12. chris01010

    User Validation (mulitple params to match)

    Bit of a no brainer probably for most, but i'm banging my head against me monitor at this precise moment in time. Basically I want to check that the User, is the correct User to run this script against a number of parameters. i.e. { if [ "env"= "a" ] && [ "node" = "test" ] && [ "User"...
  13. chris01010

    Utilising variables in an IF statement

    Hi, I'm having trouble with a script that i'm writing. Basically i'm trying to get my script to check a pre set variable in an IF statement and based on it's value follow a course of action. i.e. Variable $node is equal to "trial" if $node=trial then env=e else echo "This environment is...
  14. chris01010

    2 loops, 1 if statement and 1 script

    I am currently writing a script where it is necessary to copy a number of files to a number of directories and I want to do it re-using 1 if statement, what I don't want is to copy all of the files to all the directories. Basically I want the script to look at the first variable (being the...

Part and Inventory Search

Back
Top