Find the answer to your Linux question:
Results 1 to 3 of 3
Hello, I'm trying to migrate some scripts from our old Solaris box to a new Linux box running Red Hat. I'm getting some weird problems. For example: >ls html_creation.ksh >. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    3

    Ksh script problems


    Hello,

    I'm trying to migrate some scripts from our old Solaris box to a new Linux box running Red Hat.

    I'm getting some weird problems. For example:

    >ls
    html_creation.ksh
    >. ./prod/scripts/html_creation.ksh
    : not foundscripts/html_creation.ksh[6]: date

    this is weird to me, because the script is something like
    #!/usr/bin/ksh
    .
    .
    date
    .
    .

    I'm getting another strange error when I try to use the script with nohup:
    >nohup /prod/scripts/html_creation.ksh
    nohup: cannot run command `/prod/scripts/html_creation.ksh': No such file or directory

    Of course, using vi to open the file (directory path included) works fine.

    Since it's a new server, I'm sure some of the environment settings are off. Any pointers would be appreciated.

    -Josh

  2. #2
    Just Joined!
    Join Date
    Apr 2006
    Posts
    3

    Followup

    I've tried a couple of things:

    In my .profile, I've added the line
    PATH=$PATH:.

    This doesn't seem to help.

    What does help is if I take the files I've transfered from the UNIX machine and _re-write_ them. They won't run as is, but they will run if I start over from scratch - even copying from one vi window to another. This still doesn't solve the nohup problem.

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Posts
    3
    Final Followup:

    I have to assume the problem with the scripts was from moving them from the other UNIX box - presumably there were some invisible characters after the first line that were causing problems or something (because I could copy the scripts from one terminal window to the other - and then they would work).

    As for the nohup, after I had ensured that the script, in it's entirety, without error from the perl script it called, worked, the nohup command seemed to function fine.

    -Josh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •