PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04/28/2016 5:06 PM by  pbelsky
Unix to Windows
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Greg Moeller
Private
Private
Veteran Member
(4034 points)
Veteran Member
Posts:1438


Send Message:

--
03/18/2016 2:42 PM

    As a part of our Infor10 upgrade, the company has elected to convert platforms to Windows.

    Fine.  Problem comes in, in that my co-worker and I have written a lot of shell scripts to do our work for us.

    They aren't converting cleanly... 

    For Example:  the cnvimp utility.  Seems to operate differently in Windows than in Unix.

    We are using it for IC500, RQ500, etc. jobs.. but it seems to truncate the trailing spaces off of the input file.

    Anyone found a way around this?

     

    Another thing, is that sometimes Windows appears to expect a file extension on tests if [ -s {$FILE} ]  If $FILE="any_file.txt" it appears to work well.  If instead it is $FILE="SNINVEN" the if test throws errors.

    Yes, simple enough to put a file extension on the file, but wondering why sometimes it works without and sometimes it does not like it.

     

     

     

    Mike C
    System Admin
    NFI Industries
    New Member
    (3 points)
    New Member
    Posts:1


    Send Message:

    --
    03/23/2016 10:49 AM
    How are you converting the unix scripts? CYGWIN?
    Greg Moeller
    Private
    Private
    Veteran Member
    (4034 points)
    Veteran Member
    Posts:1438


    Send Message:

    --
    03/23/2016 10:56 AM
    Yes, we are trying to get them all to run under cygwin.
    JimY
    Private
    Private
    Veteran Member
    (1438 points)
    Veteran Member
    Posts:510


    Send Message:

    --
    04/01/2016 9:03 AM
    When we went from Unix to Windows I abandoned shell scripting and went to Perl. I am now starting to learn Powershell to see if that will be useful. We don't use cnvimp so sorry I can't help you out there.
    Greg Moeller
    Private
    Private
    Veteran Member
    (4034 points)
    Veteran Member
    Posts:1438


    Send Message:

    --
    04/28/2016 3:15 PM
    Update: We are making progress (of the forward type) on our upgrade to Windows.
    We've gotten most of our Korn shell scripts converted over and actually running via Windows Task Scheduler.
    Even gotten some of our Korn shell scripts callable from Portal/Workspace/Ming.le (whatever they are calling it these days) jobs or tokens.
    -- I can go into some detail here if requested -- (it doesn't make much sense to me why it works the way that it does, but at least it works)
    pbelsky
    Corporate Applications Analyst
    Green Bay Packaging
    Veteran Member
    (230 points)
    Veteran Member
    Posts:80


    Send Message:

    --
    04/28/2016 5:06 PM
    Hey Jim, RE powershell ~ we are on windows and I have found it to be useful in certain situations. We put the exec command into a bat file and it can be called from tokendef or from within a 4GL program. One helpful thing i learned that I wanted to pass on, I found that sometimes scripts would hang unless I put a hard stop as the last statement in the script:

    stop-process -processname powershell -force

    Hope this helps!
    You are not authorized to post a reply.